What are the divisors of 2010?
1, 2, 3, 5, 6, 10, 15, 30, 67, 134, 201, 335, 402, 670, 1005, 2010
- There is a total of 16 positive divisors.
- The sum of these divisors is 4896.
- The arithmetic mean is 306.
8 even divisors
2, 6, 10, 30, 134, 402, 670, 2010
8 odd divisors
1, 3, 5, 15, 67, 201, 335, 1005
How to compute the divisors of 2010?
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 2010 by each of the numbers from 1 to 2010 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2010 / 1 = 2010 (the remainder is 0, so 1 is a divisor of 2010)
- 2010 / 2 = 1005 (the remainder is 0, so 2 is a divisor of 2010)
- 2010 / 3 = 670 (the remainder is 0, so 3 is a divisor of 2010)
- ...
- 2010 / 2009 = 1.0004977600796 (the remainder is 1, so 2009 is not a divisor of 2010)
- 2010 / 2010 = 1 (the remainder is 0, so 2010 is a divisor of 2010)
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 2010 (i.e. 44.83302354292). 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 )
- 2010 / 1 = 2010 (the remainder is 0, so 1 and 2010 are divisors of 2010)
- 2010 / 2 = 1005 (the remainder is 0, so 2 and 1005 are divisors of 2010)
- 2010 / 3 = 670 (the remainder is 0, so 3 and 670 are divisors of 2010)
- ...
- 2010 / 43 = 46.744186046512 (the remainder is 32, so 43 is not a divisor of 2010)
- 2010 / 44 = 45.681818181818 (the remainder is 30, so 44 is not a divisor of 2010)