What are the divisors of 2556?
1, 2, 3, 4, 6, 9, 12, 18, 36, 71, 142, 213, 284, 426, 639, 852, 1278, 2556
- There is a total of 18 positive divisors.
- The sum of these divisors is 6552.
- The arithmetic mean is 364.
12 even divisors
2, 4, 6, 12, 18, 36, 142, 284, 426, 852, 1278, 2556
6 odd divisors
1, 3, 9, 71, 213, 639
How to compute the divisors of 2556?
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 2556 by each of the numbers from 1 to 2556 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2556 / 1 = 2556 (the remainder is 0, so 1 is a divisor of 2556)
- 2556 / 2 = 1278 (the remainder is 0, so 2 is a divisor of 2556)
- 2556 / 3 = 852 (the remainder is 0, so 3 is a divisor of 2556)
- ...
- 2556 / 2555 = 1.0003913894325 (the remainder is 1, so 2555 is not a divisor of 2556)
- 2556 / 2556 = 1 (the remainder is 0, so 2556 is a divisor of 2556)
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 2556 (i.e. 50.556898639058). 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 )
- 2556 / 1 = 2556 (the remainder is 0, so 1 and 2556 are divisors of 2556)
- 2556 / 2 = 1278 (the remainder is 0, so 2 and 1278 are divisors of 2556)
- 2556 / 3 = 852 (the remainder is 0, so 3 and 852 are divisors of 2556)
- ...
- 2556 / 49 = 52.163265306122 (the remainder is 8, so 49 is not a divisor of 2556)
- 2556 / 50 = 51.12 (the remainder is 6, so 50 is not a divisor of 2556)