What are the divisors of 5220?
1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 29, 30, 36, 45, 58, 60, 87, 90, 116, 145, 174, 180, 261, 290, 348, 435, 522, 580, 870, 1044, 1305, 1740, 2610, 5220
- There is a total of 36 positive divisors.
- The sum of these divisors is 16380.
- The arithmetic mean is 455.
24 even divisors
2, 4, 6, 10, 12, 18, 20, 30, 36, 58, 60, 90, 116, 174, 180, 290, 348, 522, 580, 870, 1044, 1740, 2610, 5220
12 odd divisors
1, 3, 5, 9, 15, 29, 45, 87, 145, 261, 435, 1305
How to compute the divisors of 5220?
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 5220 by each of the numbers from 1 to 5220 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5220 / 1 = 5220 (the remainder is 0, so 1 is a divisor of 5220)
- 5220 / 2 = 2610 (the remainder is 0, so 2 is a divisor of 5220)
- 5220 / 3 = 1740 (the remainder is 0, so 3 is a divisor of 5220)
- ...
- 5220 / 5219 = 1.0001916075877 (the remainder is 1, so 5219 is not a divisor of 5220)
- 5220 / 5220 = 1 (the remainder is 0, so 5220 is a divisor of 5220)
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 5220 (i.e. 72.249567472754). 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 )
- 5220 / 1 = 5220 (the remainder is 0, so 1 and 5220 are divisors of 5220)
- 5220 / 2 = 2610 (the remainder is 0, so 2 and 2610 are divisors of 5220)
- 5220 / 3 = 1740 (the remainder is 0, so 3 and 1740 are divisors of 5220)
- ...
- 5220 / 71 = 73.521126760563 (the remainder is 37, so 71 is not a divisor of 5220)
- 5220 / 72 = 72.5 (the remainder is 36, so 72 is not a divisor of 5220)