What are the divisors of 4256?
1, 2, 4, 7, 8, 14, 16, 19, 28, 32, 38, 56, 76, 112, 133, 152, 224, 266, 304, 532, 608, 1064, 2128, 4256
- There is a total of 24 positive divisors.
- The sum of these divisors is 10080.
- The arithmetic mean is 420.
20 even divisors
2, 4, 8, 14, 16, 28, 32, 38, 56, 76, 112, 152, 224, 266, 304, 532, 608, 1064, 2128, 4256
4 odd divisors
1, 7, 19, 133
How to compute the divisors of 4256?
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 4256 by each of the numbers from 1 to 4256 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4256 / 1 = 4256 (the remainder is 0, so 1 is a divisor of 4256)
- 4256 / 2 = 2128 (the remainder is 0, so 2 is a divisor of 4256)
- 4256 / 3 = 1418.6666666667 (the remainder is 2, so 3 is not a divisor of 4256)
- ...
- 4256 / 4255 = 1.0002350176263 (the remainder is 1, so 4255 is not a divisor of 4256)
- 4256 / 4256 = 1 (the remainder is 0, so 4256 is a divisor of 4256)
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 4256 (i.e. 65.2380257212). 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 )
- 4256 / 1 = 4256 (the remainder is 0, so 1 and 4256 are divisors of 4256)
- 4256 / 2 = 2128 (the remainder is 0, so 2 and 2128 are divisors of 4256)
- 4256 / 3 = 1418.6666666667 (the remainder is 2, so 3 is not a divisor of 4256)
- ...
- 4256 / 64 = 66.5 (the remainder is 32, so 64 is not a divisor of 4256)
- 4256 / 65 = 65.476923076923 (the remainder is 31, so 65 is not a divisor of 4256)