What are the divisors of 2140?
1, 2, 4, 5, 10, 20, 107, 214, 428, 535, 1070, 2140
- There is a total of 12 positive divisors.
- The sum of these divisors is 4536.
- The arithmetic mean is 378.
8 even divisors
2, 4, 10, 20, 214, 428, 1070, 2140
4 odd divisors
1, 5, 107, 535
How to compute the divisors of 2140?
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 2140 by each of the numbers from 1 to 2140 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2140 / 1 = 2140 (the remainder is 0, so 1 is a divisor of 2140)
- 2140 / 2 = 1070 (the remainder is 0, so 2 is a divisor of 2140)
- 2140 / 3 = 713.33333333333 (the remainder is 1, so 3 is not a divisor of 2140)
- ...
- 2140 / 2139 = 1.0004675081814 (the remainder is 1, so 2139 is not a divisor of 2140)
- 2140 / 2140 = 1 (the remainder is 0, so 2140 is a divisor of 2140)
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 2140 (i.e. 46.260134024882). 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 )
- 2140 / 1 = 2140 (the remainder is 0, so 1 and 2140 are divisors of 2140)
- 2140 / 2 = 1070 (the remainder is 0, so 2 and 1070 are divisors of 2140)
- 2140 / 3 = 713.33333333333 (the remainder is 1, so 3 is not a divisor of 2140)
- ...
- 2140 / 45 = 47.555555555556 (the remainder is 25, so 45 is not a divisor of 2140)
- 2140 / 46 = 46.521739130435 (the remainder is 24, so 46 is not a divisor of 2140)