What are the divisors of 156?
1, 2, 3, 4, 6, 12, 13, 26, 39, 52, 78, 156
- There is a total of 12 positive divisors.
- The sum of these divisors is 392.
- The arithmetic mean is 32.666666666667.
8 even divisors
2, 4, 6, 12, 26, 52, 78, 156
4 odd divisors
1, 3, 13, 39
How to compute the divisors of 156?
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 156 by each of the numbers from 1 to 156 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 156 / 1 = 156 (the remainder is 0, so 1 is a divisor of 156)
- 156 / 2 = 78 (the remainder is 0, so 2 is a divisor of 156)
- 156 / 3 = 52 (the remainder is 0, so 3 is a divisor of 156)
- ...
- 156 / 155 = 1.0064516129032 (the remainder is 1, so 155 is not a divisor of 156)
- 156 / 156 = 1 (the remainder is 0, so 156 is a divisor of 156)
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 156 (i.e. 12.489995996797). 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 )
- 156 / 1 = 156 (the remainder is 0, so 1 and 156 are divisors of 156)
- 156 / 2 = 78 (the remainder is 0, so 2 and 78 are divisors of 156)
- 156 / 3 = 52 (the remainder is 0, so 3 and 52 are divisors of 156)
- ...
- 156 / 11 = 14.181818181818 (the remainder is 2, so 11 is not a divisor of 156)
- 156 / 12 = 13 (the remainder is 0, so 12 and 13 are divisors of 156)