What are the divisors of 1557?
1, 3, 9, 173, 519, 1557
- There is a total of 6 positive divisors.
- The sum of these divisors is 2262.
- The arithmetic mean is 377.
6 odd divisors
1, 3, 9, 173, 519, 1557
How to compute the divisors of 1557?
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 1557 by each of the numbers from 1 to 1557 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1557 / 1 = 1557 (the remainder is 0, so 1 is a divisor of 1557)
- 1557 / 2 = 778.5 (the remainder is 1, so 2 is not a divisor of 1557)
- 1557 / 3 = 519 (the remainder is 0, so 3 is a divisor of 1557)
- ...
- 1557 / 1556 = 1.0006426735219 (the remainder is 1, so 1556 is not a divisor of 1557)
- 1557 / 1557 = 1 (the remainder is 0, so 1557 is a divisor of 1557)
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 1557 (i.e. 39.458839313898). 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 )
- 1557 / 1 = 1557 (the remainder is 0, so 1 and 1557 are divisors of 1557)
- 1557 / 2 = 778.5 (the remainder is 1, so 2 is not a divisor of 1557)
- 1557 / 3 = 519 (the remainder is 0, so 3 and 519 are divisors of 1557)
- ...
- 1557 / 38 = 40.973684210526 (the remainder is 37, so 38 is not a divisor of 1557)
- 1557 / 39 = 39.923076923077 (the remainder is 36, so 39 is not a divisor of 1557)