What are the divisors of 1226?
1, 2, 613, 1226
- There is a total of 4 positive divisors.
- The sum of these divisors is 1842.
- The arithmetic mean is 460.5.
2 even divisors
2, 1226
2 odd divisors
1, 613
How to compute the divisors of 1226?
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 1226 by each of the numbers from 1 to 1226 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1226 / 1 = 1226 (the remainder is 0, so 1 is a divisor of 1226)
- 1226 / 2 = 613 (the remainder is 0, so 2 is a divisor of 1226)
- 1226 / 3 = 408.66666666667 (the remainder is 2, so 3 is not a divisor of 1226)
- ...
- 1226 / 1225 = 1.0008163265306 (the remainder is 1, so 1225 is not a divisor of 1226)
- 1226 / 1226 = 1 (the remainder is 0, so 1226 is a divisor of 1226)
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 1226 (i.e. 35.014282800023). 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 )
- 1226 / 1 = 1226 (the remainder is 0, so 1 and 1226 are divisors of 1226)
- 1226 / 2 = 613 (the remainder is 0, so 2 and 613 are divisors of 1226)
- 1226 / 3 = 408.66666666667 (the remainder is 2, so 3 is not a divisor of 1226)
- ...
- 1226 / 34 = 36.058823529412 (the remainder is 2, so 34 is not a divisor of 1226)
- 1226 / 35 = 35.028571428571 (the remainder is 1, so 35 is not a divisor of 1226)