What are the divisors of 1125?
1, 3, 5, 9, 15, 25, 45, 75, 125, 225, 375, 1125
- There is a total of 12 positive divisors.
- The sum of these divisors is 2028.
- The arithmetic mean is 169.
12 odd divisors
1, 3, 5, 9, 15, 25, 45, 75, 125, 225, 375, 1125
How to compute the divisors of 1125?
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 1125 by each of the numbers from 1 to 1125 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1125 / 1 = 1125 (the remainder is 0, so 1 is a divisor of 1125)
- 1125 / 2 = 562.5 (the remainder is 1, so 2 is not a divisor of 1125)
- 1125 / 3 = 375 (the remainder is 0, so 3 is a divisor of 1125)
- ...
- 1125 / 1124 = 1.0008896797153 (the remainder is 1, so 1124 is not a divisor of 1125)
- 1125 / 1125 = 1 (the remainder is 0, so 1125 is a divisor of 1125)
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 1125 (i.e. 33.541019662497). 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 )
- 1125 / 1 = 1125 (the remainder is 0, so 1 and 1125 are divisors of 1125)
- 1125 / 2 = 562.5 (the remainder is 1, so 2 is not a divisor of 1125)
- 1125 / 3 = 375 (the remainder is 0, so 3 and 375 are divisors of 1125)
- ...
- 1125 / 32 = 35.15625 (the remainder is 5, so 32 is not a divisor of 1125)
- 1125 / 33 = 34.090909090909 (the remainder is 3, so 33 is not a divisor of 1125)