What are the divisors of 1980?
1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 15, 18, 20, 22, 30, 33, 36, 44, 45, 55, 60, 66, 90, 99, 110, 132, 165, 180, 198, 220, 330, 396, 495, 660, 990, 1980
- There is a total of 36 positive divisors.
- The sum of these divisors is 6552.
- The arithmetic mean is 182.
24 even divisors
2, 4, 6, 10, 12, 18, 20, 22, 30, 36, 44, 60, 66, 90, 110, 132, 180, 198, 220, 330, 396, 660, 990, 1980
12 odd divisors
1, 3, 5, 9, 11, 15, 33, 45, 55, 99, 165, 495
How to compute the divisors of 1980?
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 1980 by each of the numbers from 1 to 1980 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1980 / 1 = 1980 (the remainder is 0, so 1 is a divisor of 1980)
- 1980 / 2 = 990 (the remainder is 0, so 2 is a divisor of 1980)
- 1980 / 3 = 660 (the remainder is 0, so 3 is a divisor of 1980)
- ...
- 1980 / 1979 = 1.00050530571 (the remainder is 1, so 1979 is not a divisor of 1980)
- 1980 / 1980 = 1 (the remainder is 0, so 1980 is a divisor of 1980)
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 1980 (i.e. 44.497190922574). 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 )
- 1980 / 1 = 1980 (the remainder is 0, so 1 and 1980 are divisors of 1980)
- 1980 / 2 = 990 (the remainder is 0, so 2 and 990 are divisors of 1980)
- 1980 / 3 = 660 (the remainder is 0, so 3 and 660 are divisors of 1980)
- ...
- 1980 / 43 = 46.046511627907 (the remainder is 2, so 43 is not a divisor of 1980)
- 1980 / 44 = 45 (the remainder is 0, so 44 and 45 are divisors of 1980)