What are the divisors of 2304?
1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 32, 36, 48, 64, 72, 96, 128, 144, 192, 256, 288, 384, 576, 768, 1152, 2304
- There is a total of 27 positive divisors.
- The sum of these divisors is 6643.
- The arithmetic mean is 246.03703703704.
24 even divisors
2, 4, 6, 8, 12, 16, 18, 24, 32, 36, 48, 64, 72, 96, 128, 144, 192, 256, 288, 384, 576, 768, 1152, 2304
3 odd divisors
1, 3, 9
How to compute the divisors of 2304?
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 2304 by each of the numbers from 1 to 2304 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2304 / 1 = 2304 (the remainder is 0, so 1 is a divisor of 2304)
- 2304 / 2 = 1152 (the remainder is 0, so 2 is a divisor of 2304)
- 2304 / 3 = 768 (the remainder is 0, so 3 is a divisor of 2304)
- ...
- 2304 / 2303 = 1.0004342162397 (the remainder is 1, so 2303 is not a divisor of 2304)
- 2304 / 2304 = 1 (the remainder is 0, so 2304 is a divisor of 2304)
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 2304 (i.e. 48). 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 )
- 2304 / 1 = 2304 (the remainder is 0, so 1 and 2304 are divisors of 2304)
- 2304 / 2 = 1152 (the remainder is 0, so 2 and 1152 are divisors of 2304)
- 2304 / 3 = 768 (the remainder is 0, so 3 and 768 are divisors of 2304)
- ...
- 2304 / 47 = 49.021276595745 (the remainder is 1, so 47 is not a divisor of 2304)
- 2304 / 48 = 48 (the remainder is 0, so 48 and 48 are divisors of 2304)