What are the divisors of 2520?
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 18, 20, 21, 24, 28, 30, 35, 36, 40, 42, 45, 56, 60, 63, 70, 72, 84, 90, 105, 120, 126, 140, 168, 180, 210, 252, 280, 315, 360, 420, 504, 630, 840, 1260, 2520
- There is a total of 48 positive divisors.
- The sum of these divisors is 9360.
- The arithmetic mean is 195.
36 even divisors
2, 4, 6, 8, 10, 12, 14, 18, 20, 24, 28, 30, 36, 40, 42, 56, 60, 70, 72, 84, 90, 120, 126, 140, 168, 180, 210, 252, 280, 360, 420, 504, 630, 840, 1260, 2520
12 odd divisors
1, 3, 5, 7, 9, 15, 21, 35, 45, 63, 105, 315
How to compute the divisors of 2520?
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 2520 by each of the numbers from 1 to 2520 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2520 / 1 = 2520 (the remainder is 0, so 1 is a divisor of 2520)
- 2520 / 2 = 1260 (the remainder is 0, so 2 is a divisor of 2520)
- 2520 / 3 = 840 (the remainder is 0, so 3 is a divisor of 2520)
- ...
- 2520 / 2519 = 1.0003969829297 (the remainder is 1, so 2519 is not a divisor of 2520)
- 2520 / 2520 = 1 (the remainder is 0, so 2520 is a divisor of 2520)
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 2520 (i.e. 50.199601592045). 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 )
- 2520 / 1 = 2520 (the remainder is 0, so 1 and 2520 are divisors of 2520)
- 2520 / 2 = 1260 (the remainder is 0, so 2 and 1260 are divisors of 2520)
- 2520 / 3 = 840 (the remainder is 0, so 3 and 840 are divisors of 2520)
- ...
- 2520 / 49 = 51.428571428571 (the remainder is 21, so 49 is not a divisor of 2520)
- 2520 / 50 = 50.4 (the remainder is 20, so 50 is not a divisor of 2520)