What are the divisors of 5904?
1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 36, 41, 48, 72, 82, 123, 144, 164, 246, 328, 369, 492, 656, 738, 984, 1476, 1968, 2952, 5904
- There is a total of 30 positive divisors.
- The sum of these divisors is 16926.
- The arithmetic mean is 564.2.
24 even divisors
2, 4, 6, 8, 12, 16, 18, 24, 36, 48, 72, 82, 144, 164, 246, 328, 492, 656, 738, 984, 1476, 1968, 2952, 5904
6 odd divisors
1, 3, 9, 41, 123, 369
How to compute the divisors of 5904?
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 5904 by each of the numbers from 1 to 5904 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5904 / 1 = 5904 (the remainder is 0, so 1 is a divisor of 5904)
- 5904 / 2 = 2952 (the remainder is 0, so 2 is a divisor of 5904)
- 5904 / 3 = 1968 (the remainder is 0, so 3 is a divisor of 5904)
- ...
- 5904 / 5903 = 1.0001694053871 (the remainder is 1, so 5903 is not a divisor of 5904)
- 5904 / 5904 = 1 (the remainder is 0, so 5904 is a divisor of 5904)
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 5904 (i.e. 76.837490849194). 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 )
- 5904 / 1 = 5904 (the remainder is 0, so 1 and 5904 are divisors of 5904)
- 5904 / 2 = 2952 (the remainder is 0, so 2 and 2952 are divisors of 5904)
- 5904 / 3 = 1968 (the remainder is 0, so 3 and 1968 are divisors of 5904)
- ...
- 5904 / 75 = 78.72 (the remainder is 54, so 75 is not a divisor of 5904)
- 5904 / 76 = 77.684210526316 (the remainder is 52, so 76 is not a divisor of 5904)