What are the divisors of 1276?
1, 2, 4, 11, 22, 29, 44, 58, 116, 319, 638, 1276
- There is a total of 12 positive divisors.
- The sum of these divisors is 2520.
- The arithmetic mean is 210.
8 even divisors
2, 4, 22, 44, 58, 116, 638, 1276
4 odd divisors
1, 11, 29, 319
How to compute the divisors of 1276?
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 1276 by each of the numbers from 1 to 1276 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1276 / 1 = 1276 (the remainder is 0, so 1 is a divisor of 1276)
- 1276 / 2 = 638 (the remainder is 0, so 2 is a divisor of 1276)
- 1276 / 3 = 425.33333333333 (the remainder is 1, so 3 is not a divisor of 1276)
- ...
- 1276 / 1275 = 1.0007843137255 (the remainder is 1, so 1275 is not a divisor of 1276)
- 1276 / 1276 = 1 (the remainder is 0, so 1276 is a divisor of 1276)
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 1276 (i.e. 35.721142198984). 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 )
- 1276 / 1 = 1276 (the remainder is 0, so 1 and 1276 are divisors of 1276)
- 1276 / 2 = 638 (the remainder is 0, so 2 and 638 are divisors of 1276)
- 1276 / 3 = 425.33333333333 (the remainder is 1, so 3 is not a divisor of 1276)
- ...
- 1276 / 34 = 37.529411764706 (the remainder is 18, so 34 is not a divisor of 1276)
- 1276 / 35 = 36.457142857143 (the remainder is 16, so 35 is not a divisor of 1276)