What are the divisors of 456?
1, 2, 3, 4, 6, 8, 12, 19, 24, 38, 57, 76, 114, 152, 228, 456
- There is a total of 16 positive divisors.
- The sum of these divisors is 1200.
- The arithmetic mean is 75.
12 even divisors
2, 4, 6, 8, 12, 24, 38, 76, 114, 152, 228, 456
4 odd divisors
1, 3, 19, 57
How to compute the divisors of 456?
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 456 by each of the numbers from 1 to 456 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 456 / 1 = 456 (the remainder is 0, so 1 is a divisor of 456)
- 456 / 2 = 228 (the remainder is 0, so 2 is a divisor of 456)
- 456 / 3 = 152 (the remainder is 0, so 3 is a divisor of 456)
- ...
- 456 / 455 = 1.0021978021978 (the remainder is 1, so 455 is not a divisor of 456)
- 456 / 456 = 1 (the remainder is 0, so 456 is a divisor of 456)
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 456 (i.e. 21.354156504063). 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 )
- 456 / 1 = 456 (the remainder is 0, so 1 and 456 are divisors of 456)
- 456 / 2 = 228 (the remainder is 0, so 2 and 228 are divisors of 456)
- 456 / 3 = 152 (the remainder is 0, so 3 and 152 are divisors of 456)
- ...
- 456 / 20 = 22.8 (the remainder is 16, so 20 is not a divisor of 456)
- 456 / 21 = 21.714285714286 (the remainder is 15, so 21 is not a divisor of 456)