What are the divisors of 2154?
1, 2, 3, 6, 359, 718, 1077, 2154
- There is a total of 8 positive divisors.
- The sum of these divisors is 4320.
- The arithmetic mean is 540.
4 even divisors
2, 6, 718, 2154
4 odd divisors
1, 3, 359, 1077
How to compute the divisors of 2154?
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 2154 by each of the numbers from 1 to 2154 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2154 / 1 = 2154 (the remainder is 0, so 1 is a divisor of 2154)
- 2154 / 2 = 1077 (the remainder is 0, so 2 is a divisor of 2154)
- 2154 / 3 = 718 (the remainder is 0, so 3 is a divisor of 2154)
- ...
- 2154 / 2153 = 1.0004644681839 (the remainder is 1, so 2153 is not a divisor of 2154)
- 2154 / 2154 = 1 (the remainder is 0, so 2154 is a divisor of 2154)
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 2154 (i.e. 46.411205543489). 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 )
- 2154 / 1 = 2154 (the remainder is 0, so 1 and 2154 are divisors of 2154)
- 2154 / 2 = 1077 (the remainder is 0, so 2 and 1077 are divisors of 2154)
- 2154 / 3 = 718 (the remainder is 0, so 3 and 718 are divisors of 2154)
- ...
- 2154 / 45 = 47.866666666667 (the remainder is 39, so 45 is not a divisor of 2154)
- 2154 / 46 = 46.826086956522 (the remainder is 38, so 46 is not a divisor of 2154)