What are the divisors of 1204?
1, 2, 4, 7, 14, 28, 43, 86, 172, 301, 602, 1204
- There is a total of 12 positive divisors.
- The sum of these divisors is 2464.
- The arithmetic mean is 205.33333333333.
8 even divisors
2, 4, 14, 28, 86, 172, 602, 1204
4 odd divisors
1, 7, 43, 301
How to compute the divisors of 1204?
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 1204 by each of the numbers from 1 to 1204 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1204 / 1 = 1204 (the remainder is 0, so 1 is a divisor of 1204)
- 1204 / 2 = 602 (the remainder is 0, so 2 is a divisor of 1204)
- 1204 / 3 = 401.33333333333 (the remainder is 1, so 3 is not a divisor of 1204)
- ...
- 1204 / 1203 = 1.0008312551953 (the remainder is 1, so 1203 is not a divisor of 1204)
- 1204 / 1204 = 1 (the remainder is 0, so 1204 is a divisor of 1204)
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 1204 (i.e. 34.698703145795). 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 )
- 1204 / 1 = 1204 (the remainder is 0, so 1 and 1204 are divisors of 1204)
- 1204 / 2 = 602 (the remainder is 0, so 2 and 602 are divisors of 1204)
- 1204 / 3 = 401.33333333333 (the remainder is 1, so 3 is not a divisor of 1204)
- ...
- 1204 / 33 = 36.484848484848 (the remainder is 16, so 33 is not a divisor of 1204)
- 1204 / 34 = 35.411764705882 (the remainder is 14, so 34 is not a divisor of 1204)