What are the divisors of 2160?
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 27, 30, 36, 40, 45, 48, 54, 60, 72, 80, 90, 108, 120, 135, 144, 180, 216, 240, 270, 360, 432, 540, 720, 1080, 2160
- There is a total of 40 positive divisors.
- The sum of these divisors is 7440.
- The arithmetic mean is 186.
32 even divisors
2, 4, 6, 8, 10, 12, 16, 18, 20, 24, 30, 36, 40, 48, 54, 60, 72, 80, 90, 108, 120, 144, 180, 216, 240, 270, 360, 432, 540, 720, 1080, 2160
8 odd divisors
1, 3, 5, 9, 15, 27, 45, 135
How to compute the divisors of 2160?
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 2160 by each of the numbers from 1 to 2160 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2160 / 1 = 2160 (the remainder is 0, so 1 is a divisor of 2160)
- 2160 / 2 = 1080 (the remainder is 0, so 2 is a divisor of 2160)
- 2160 / 3 = 720 (the remainder is 0, so 3 is a divisor of 2160)
- ...
- 2160 / 2159 = 1.0004631773969 (the remainder is 1, so 2159 is not a divisor of 2160)
- 2160 / 2160 = 1 (the remainder is 0, so 2160 is a divisor of 2160)
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 2160 (i.e. 46.475800154489). 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 )
- 2160 / 1 = 2160 (the remainder is 0, so 1 and 2160 are divisors of 2160)
- 2160 / 2 = 1080 (the remainder is 0, so 2 and 1080 are divisors of 2160)
- 2160 / 3 = 720 (the remainder is 0, so 3 and 720 are divisors of 2160)
- ...
- 2160 / 45 = 48 (the remainder is 0, so 45 and 48 are divisors of 2160)
- 2160 / 46 = 46.95652173913 (the remainder is 44, so 46 is not a divisor of 2160)