What are the divisors of 900?
1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 25, 30, 36, 45, 50, 60, 75, 90, 100, 150, 180, 225, 300, 450, 900
- There is a total of 27 positive divisors.
- The sum of these divisors is 2821.
- The arithmetic mean is 104.48148148148.
18 even divisors
2, 4, 6, 10, 12, 18, 20, 30, 36, 50, 60, 90, 100, 150, 180, 300, 450, 900
9 odd divisors
1, 3, 5, 9, 15, 25, 45, 75, 225
How to compute the divisors of 900?
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 900 by each of the numbers from 1 to 900 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 900 / 1 = 900 (the remainder is 0, so 1 is a divisor of 900)
- 900 / 2 = 450 (the remainder is 0, so 2 is a divisor of 900)
- 900 / 3 = 300 (the remainder is 0, so 3 is a divisor of 900)
- ...
- 900 / 899 = 1.0011123470523 (the remainder is 1, so 899 is not a divisor of 900)
- 900 / 900 = 1 (the remainder is 0, so 900 is a divisor of 900)
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 900 (i.e. 30). 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 )
- 900 / 1 = 900 (the remainder is 0, so 1 and 900 are divisors of 900)
- 900 / 2 = 450 (the remainder is 0, so 2 and 450 are divisors of 900)
- 900 / 3 = 300 (the remainder is 0, so 3 and 300 are divisors of 900)
- ...
- 900 / 29 = 31.034482758621 (the remainder is 1, so 29 is not a divisor of 900)
- 900 / 30 = 30 (the remainder is 0, so 30 and 30 are divisors of 900)