What are the divisors of 1274?
1, 2, 7, 13, 14, 26, 49, 91, 98, 182, 637, 1274
- There is a total of 12 positive divisors.
- The sum of these divisors is 2394.
- The arithmetic mean is 199.5.
6 even divisors
2, 14, 26, 98, 182, 1274
6 odd divisors
1, 7, 13, 49, 91, 637
How to compute the divisors of 1274?
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 1274 by each of the numbers from 1 to 1274 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1274 / 1 = 1274 (the remainder is 0, so 1 is a divisor of 1274)
- 1274 / 2 = 637 (the remainder is 0, so 2 is a divisor of 1274)
- 1274 / 3 = 424.66666666667 (the remainder is 2, so 3 is not a divisor of 1274)
- ...
- 1274 / 1273 = 1.0007855459544 (the remainder is 1, so 1273 is not a divisor of 1274)
- 1274 / 1274 = 1 (the remainder is 0, so 1274 is a divisor of 1274)
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 1274 (i.e. 35.693136595149). 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 )
- 1274 / 1 = 1274 (the remainder is 0, so 1 and 1274 are divisors of 1274)
- 1274 / 2 = 637 (the remainder is 0, so 2 and 637 are divisors of 1274)
- 1274 / 3 = 424.66666666667 (the remainder is 2, so 3 is not a divisor of 1274)
- ...
- 1274 / 34 = 37.470588235294 (the remainder is 16, so 34 is not a divisor of 1274)
- 1274 / 35 = 36.4 (the remainder is 14, so 35 is not a divisor of 1274)