What are the divisors of 1156?
1, 2, 4, 17, 34, 68, 289, 578, 1156
- There is a total of 9 positive divisors.
- The sum of these divisors is 2149.
- The arithmetic mean is 238.77777777778.
6 even divisors
2, 4, 34, 68, 578, 1156
3 odd divisors
1, 17, 289
How to compute the divisors of 1156?
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 1156 by each of the numbers from 1 to 1156 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1156 / 1 = 1156 (the remainder is 0, so 1 is a divisor of 1156)
- 1156 / 2 = 578 (the remainder is 0, so 2 is a divisor of 1156)
- 1156 / 3 = 385.33333333333 (the remainder is 1, so 3 is not a divisor of 1156)
- ...
- 1156 / 1155 = 1.0008658008658 (the remainder is 1, so 1155 is not a divisor of 1156)
- 1156 / 1156 = 1 (the remainder is 0, so 1156 is a divisor of 1156)
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 1156 (i.e. 34). 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 )
- 1156 / 1 = 1156 (the remainder is 0, so 1 and 1156 are divisors of 1156)
- 1156 / 2 = 578 (the remainder is 0, so 2 and 578 are divisors of 1156)
- 1156 / 3 = 385.33333333333 (the remainder is 1, so 3 is not a divisor of 1156)
- ...
- 1156 / 33 = 35.030303030303 (the remainder is 1, so 33 is not a divisor of 1156)
- 1156 / 34 = 34 (the remainder is 0, so 34 and 34 are divisors of 1156)