What are the divisors of 4128?
1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 43, 48, 86, 96, 129, 172, 258, 344, 516, 688, 1032, 1376, 2064, 4128
- There is a total of 24 positive divisors.
- The sum of these divisors is 11088.
- The arithmetic mean is 462.
20 even divisors
2, 4, 6, 8, 12, 16, 24, 32, 48, 86, 96, 172, 258, 344, 516, 688, 1032, 1376, 2064, 4128
4 odd divisors
1, 3, 43, 129
How to compute the divisors of 4128?
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 4128 by each of the numbers from 1 to 4128 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4128 / 1 = 4128 (the remainder is 0, so 1 is a divisor of 4128)
- 4128 / 2 = 2064 (the remainder is 0, so 2 is a divisor of 4128)
- 4128 / 3 = 1376 (the remainder is 0, so 3 is a divisor of 4128)
- ...
- 4128 / 4127 = 1.0002423067604 (the remainder is 1, so 4127 is not a divisor of 4128)
- 4128 / 4128 = 1 (the remainder is 0, so 4128 is a divisor of 4128)
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 4128 (i.e. 64.249513616836). 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 )
- 4128 / 1 = 4128 (the remainder is 0, so 1 and 4128 are divisors of 4128)
- 4128 / 2 = 2064 (the remainder is 0, so 2 and 2064 are divisors of 4128)
- 4128 / 3 = 1376 (the remainder is 0, so 3 and 1376 are divisors of 4128)
- ...
- 4128 / 63 = 65.52380952381 (the remainder is 33, so 63 is not a divisor of 4128)
- 4128 / 64 = 64.5 (the remainder is 32, so 64 is not a divisor of 4128)