What are the divisors of 555?
1, 3, 5, 15, 37, 111, 185, 555
- There is a total of 8 positive divisors.
- The sum of these divisors is 912.
- The arithmetic mean is 114.
8 odd divisors
1, 3, 5, 15, 37, 111, 185, 555
How to compute the divisors of 555?
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 555 by each of the numbers from 1 to 555 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 555 / 1 = 555 (the remainder is 0, so 1 is a divisor of 555)
- 555 / 2 = 277.5 (the remainder is 1, so 2 is not a divisor of 555)
- 555 / 3 = 185 (the remainder is 0, so 3 is a divisor of 555)
- ...
- 555 / 554 = 1.0018050541516 (the remainder is 1, so 554 is not a divisor of 555)
- 555 / 555 = 1 (the remainder is 0, so 555 is a divisor of 555)
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 555 (i.e. 23.558437978779). 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 )
- 555 / 1 = 555 (the remainder is 0, so 1 and 555 are divisors of 555)
- 555 / 2 = 277.5 (the remainder is 1, so 2 is not a divisor of 555)
- 555 / 3 = 185 (the remainder is 0, so 3 and 185 are divisors of 555)
- ...
- 555 / 22 = 25.227272727273 (the remainder is 5, so 22 is not a divisor of 555)
- 555 / 23 = 24.130434782609 (the remainder is 3, so 23 is not a divisor of 555)