What are the divisors of 4116?
1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 49, 84, 98, 147, 196, 294, 343, 588, 686, 1029, 1372, 2058, 4116
- There is a total of 24 positive divisors.
- The sum of these divisors is 11200.
- The arithmetic mean is 466.66666666667.
16 even divisors
2, 4, 6, 12, 14, 28, 42, 84, 98, 196, 294, 588, 686, 1372, 2058, 4116
8 odd divisors
1, 3, 7, 21, 49, 147, 343, 1029
How to compute the divisors of 4116?
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 4116 by each of the numbers from 1 to 4116 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4116 / 1 = 4116 (the remainder is 0, so 1 is a divisor of 4116)
- 4116 / 2 = 2058 (the remainder is 0, so 2 is a divisor of 4116)
- 4116 / 3 = 1372 (the remainder is 0, so 3 is a divisor of 4116)
- ...
- 4116 / 4115 = 1.0002430133657 (the remainder is 1, so 4115 is not a divisor of 4116)
- 4116 / 4116 = 1 (the remainder is 0, so 4116 is a divisor of 4116)
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 4116 (i.e. 64.156059729382). 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 )
- 4116 / 1 = 4116 (the remainder is 0, so 1 and 4116 are divisors of 4116)
- 4116 / 2 = 2058 (the remainder is 0, so 2 and 2058 are divisors of 4116)
- 4116 / 3 = 1372 (the remainder is 0, so 3 and 1372 are divisors of 4116)
- ...
- 4116 / 63 = 65.333333333333 (the remainder is 21, so 63 is not a divisor of 4116)
- 4116 / 64 = 64.3125 (the remainder is 20, so 64 is not a divisor of 4116)