What are the divisors of 5304?
1, 2, 3, 4, 6, 8, 12, 13, 17, 24, 26, 34, 39, 51, 52, 68, 78, 102, 104, 136, 156, 204, 221, 312, 408, 442, 663, 884, 1326, 1768, 2652, 5304
- There is a total of 32 positive divisors.
- The sum of these divisors is 15120.
- The arithmetic mean is 472.5.
24 even divisors
2, 4, 6, 8, 12, 24, 26, 34, 52, 68, 78, 102, 104, 136, 156, 204, 312, 408, 442, 884, 1326, 1768, 2652, 5304
8 odd divisors
1, 3, 13, 17, 39, 51, 221, 663
How to compute the divisors of 5304?
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 5304 by each of the numbers from 1 to 5304 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5304 / 1 = 5304 (the remainder is 0, so 1 is a divisor of 5304)
- 5304 / 2 = 2652 (the remainder is 0, so 2 is a divisor of 5304)
- 5304 / 3 = 1768 (the remainder is 0, so 3 is a divisor of 5304)
- ...
- 5304 / 5303 = 1.0001885725061 (the remainder is 1, so 5303 is not a divisor of 5304)
- 5304 / 5304 = 1 (the remainder is 0, so 5304 is a divisor of 5304)
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 5304 (i.e. 72.828565824132). 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 )
- 5304 / 1 = 5304 (the remainder is 0, so 1 and 5304 are divisors of 5304)
- 5304 / 2 = 2652 (the remainder is 0, so 2 and 2652 are divisors of 5304)
- 5304 / 3 = 1768 (the remainder is 0, so 3 and 1768 are divisors of 5304)
- ...
- 5304 / 71 = 74.704225352113 (the remainder is 50, so 71 is not a divisor of 5304)
- 5304 / 72 = 73.666666666667 (the remainder is 48, so 72 is not a divisor of 5304)