What are the divisors of 4056?
1, 2, 3, 4, 6, 8, 12, 13, 24, 26, 39, 52, 78, 104, 156, 169, 312, 338, 507, 676, 1014, 1352, 2028, 4056
- There is a total of 24 positive divisors.
- The sum of these divisors is 10980.
- The arithmetic mean is 457.5.
18 even divisors
2, 4, 6, 8, 12, 24, 26, 52, 78, 104, 156, 312, 338, 676, 1014, 1352, 2028, 4056
6 odd divisors
1, 3, 13, 39, 169, 507
How to compute the divisors of 4056?
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 4056 by each of the numbers from 1 to 4056 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4056 / 1 = 4056 (the remainder is 0, so 1 is a divisor of 4056)
- 4056 / 2 = 2028 (the remainder is 0, so 2 is a divisor of 4056)
- 4056 / 3 = 1352 (the remainder is 0, so 3 is a divisor of 4056)
- ...
- 4056 / 4055 = 1.0002466091245 (the remainder is 1, so 4055 is not a divisor of 4056)
- 4056 / 4056 = 1 (the remainder is 0, so 4056 is a divisor of 4056)
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 4056 (i.e. 63.686733312363). 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 )
- 4056 / 1 = 4056 (the remainder is 0, so 1 and 4056 are divisors of 4056)
- 4056 / 2 = 2028 (the remainder is 0, so 2 and 2028 are divisors of 4056)
- 4056 / 3 = 1352 (the remainder is 0, so 3 and 1352 are divisors of 4056)
- ...
- 4056 / 62 = 65.41935483871 (the remainder is 26, so 62 is not a divisor of 4056)
- 4056 / 63 = 64.380952380952 (the remainder is 24, so 63 is not a divisor of 4056)