What are the divisors of 155?
1, 5, 31, 155
- There is a total of 4 positive divisors.
- The sum of these divisors is 192.
- The arithmetic mean is 48.
4 odd divisors
1, 5, 31, 155
How to compute the divisors of 155?
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 155 by each of the numbers from 1 to 155 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 155 / 1 = 155 (the remainder is 0, so 1 is a divisor of 155)
- 155 / 2 = 77.5 (the remainder is 1, so 2 is not a divisor of 155)
- 155 / 3 = 51.666666666667 (the remainder is 2, so 3 is not a divisor of 155)
- ...
- 155 / 154 = 1.0064935064935 (the remainder is 1, so 154 is not a divisor of 155)
- 155 / 155 = 1 (the remainder is 0, so 155 is a divisor of 155)
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 155 (i.e. 12.449899597989). 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 )
- 155 / 1 = 155 (the remainder is 0, so 1 and 155 are divisors of 155)
- 155 / 2 = 77.5 (the remainder is 1, so 2 is not a divisor of 155)
- 155 / 3 = 51.666666666667 (the remainder is 2, so 3 is not a divisor of 155)
- ...
- 155 / 11 = 14.090909090909 (the remainder is 1, so 11 is not a divisor of 155)
- 155 / 12 = 12.916666666667 (the remainder is 11, so 12 is not a divisor of 155)