What are the divisors of 5208?
1, 2, 3, 4, 6, 7, 8, 12, 14, 21, 24, 28, 31, 42, 56, 62, 84, 93, 124, 168, 186, 217, 248, 372, 434, 651, 744, 868, 1302, 1736, 2604, 5208
- There is a total of 32 positive divisors.
- The sum of these divisors is 15360.
- The arithmetic mean is 480.
24 even divisors
2, 4, 6, 8, 12, 14, 24, 28, 42, 56, 62, 84, 124, 168, 186, 248, 372, 434, 744, 868, 1302, 1736, 2604, 5208
8 odd divisors
1, 3, 7, 21, 31, 93, 217, 651
How to compute the divisors of 5208?
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 5208 by each of the numbers from 1 to 5208 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5208 / 1 = 5208 (the remainder is 0, so 1 is a divisor of 5208)
- 5208 / 2 = 2604 (the remainder is 0, so 2 is a divisor of 5208)
- 5208 / 3 = 1736 (the remainder is 0, so 3 is a divisor of 5208)
- ...
- 5208 / 5207 = 1.0001920491646 (the remainder is 1, so 5207 is not a divisor of 5208)
- 5208 / 5208 = 1 (the remainder is 0, so 5208 is a divisor of 5208)
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 5208 (i.e. 72.166474210675). 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 )
- 5208 / 1 = 5208 (the remainder is 0, so 1 and 5208 are divisors of 5208)
- 5208 / 2 = 2604 (the remainder is 0, so 2 and 2604 are divisors of 5208)
- 5208 / 3 = 1736 (the remainder is 0, so 3 and 1736 are divisors of 5208)
- ...
- 5208 / 71 = 73.352112676056 (the remainder is 25, so 71 is not a divisor of 5208)
- 5208 / 72 = 72.333333333333 (the remainder is 24, so 72 is not a divisor of 5208)