What are the divisors of 2604?
1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 31, 42, 62, 84, 93, 124, 186, 217, 372, 434, 651, 868, 1302, 2604
- There is a total of 24 positive divisors.
- The sum of these divisors is 7168.
- The arithmetic mean is 298.66666666667.
16 even divisors
2, 4, 6, 12, 14, 28, 42, 62, 84, 124, 186, 372, 434, 868, 1302, 2604
8 odd divisors
1, 3, 7, 21, 31, 93, 217, 651
How to compute the divisors of 2604?
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 2604 by each of the numbers from 1 to 2604 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2604 / 1 = 2604 (the remainder is 0, so 1 is a divisor of 2604)
- 2604 / 2 = 1302 (the remainder is 0, so 2 is a divisor of 2604)
- 2604 / 3 = 868 (the remainder is 0, so 3 is a divisor of 2604)
- ...
- 2604 / 2603 = 1.0003841721091 (the remainder is 1, so 2603 is not a divisor of 2604)
- 2604 / 2604 = 1 (the remainder is 0, so 2604 is a divisor of 2604)
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 2604 (i.e. 51.029403288692). 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 )
- 2604 / 1 = 2604 (the remainder is 0, so 1 and 2604 are divisors of 2604)
- 2604 / 2 = 1302 (the remainder is 0, so 2 and 1302 are divisors of 2604)
- 2604 / 3 = 868 (the remainder is 0, so 3 and 868 are divisors of 2604)
- ...
- 2604 / 50 = 52.08 (the remainder is 4, so 50 is not a divisor of 2604)
- 2604 / 51 = 51.058823529412 (the remainder is 3, so 51 is not a divisor of 2604)