What are the divisors of 4160?
1, 2, 4, 5, 8, 10, 13, 16, 20, 26, 32, 40, 52, 64, 65, 80, 104, 130, 160, 208, 260, 320, 416, 520, 832, 1040, 2080, 4160
- There is a total of 28 positive divisors.
- The sum of these divisors is 10668.
- The arithmetic mean is 381.
24 even divisors
2, 4, 8, 10, 16, 20, 26, 32, 40, 52, 64, 80, 104, 130, 160, 208, 260, 320, 416, 520, 832, 1040, 2080, 4160
4 odd divisors
1, 5, 13, 65
How to compute the divisors of 4160?
A number N is said to be divisible by a number M (with M non-zero) if, when we divide N by M, the remainder of the division is zero.
Brute force algorithm
We could start by using a brute-force method which would involve dividing 4160 by each of the numbers from 1 to 4160 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4160 / 1 = 4160 (the remainder is 0, so 1 is a divisor of 4160)
- 4160 / 2 = 2080 (the remainder is 0, so 2 is a divisor of 4160)
- 4160 / 3 = 1386.6666666667 (the remainder is 2, so 3 is not a divisor of 4160)
- ...
- 4160 / 4159 = 1.000240442414 (the remainder is 1, so 4159 is not a divisor of 4160)
- 4160 / 4160 = 1 (the remainder is 0, so 4160 is a divisor of 4160)
Improved algorithm using square-root
However, there is another slightly better approach that reduces the number of iterations by testing only integers less than or equal to the square root of 4160 (i.e. 64.498061986388). Indeed, if a number N has a divisor D greater than its square root, then there is necessarily a smaller divisor d such that:
(thus, if , then )
- 4160 / 1 = 4160 (the remainder is 0, so 1 and 4160 are divisors of 4160)
- 4160 / 2 = 2080 (the remainder is 0, so 2 and 2080 are divisors of 4160)
- 4160 / 3 = 1386.6666666667 (the remainder is 2, so 3 is not a divisor of 4160)
- ...
- 4160 / 63 = 66.031746031746 (the remainder is 2, so 63 is not a divisor of 4160)
- 4160 / 64 = 65 (the remainder is 0, so 64 and 65 are divisors of 4160)