What are the divisors of 630?
1, 2, 3, 5, 6, 7, 9, 10, 14, 15, 18, 21, 30, 35, 42, 45, 63, 70, 90, 105, 126, 210, 315, 630
- There is a total of 24 positive divisors.
- The sum of these divisors is 1872.
- The arithmetic mean is 78.
12 even divisors
2, 6, 10, 14, 18, 30, 42, 70, 90, 126, 210, 630
12 odd divisors
1, 3, 5, 7, 9, 15, 21, 35, 45, 63, 105, 315
How to compute the divisors of 630?
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 630 by each of the numbers from 1 to 630 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 630 / 1 = 630 (the remainder is 0, so 1 is a divisor of 630)
- 630 / 2 = 315 (the remainder is 0, so 2 is a divisor of 630)
- 630 / 3 = 210 (the remainder is 0, so 3 is a divisor of 630)
- ...
- 630 / 629 = 1.0015898251192 (the remainder is 1, so 629 is not a divisor of 630)
- 630 / 630 = 1 (the remainder is 0, so 630 is a divisor of 630)
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 630 (i.e. 25.099800796022). 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 )
- 630 / 1 = 630 (the remainder is 0, so 1 and 630 are divisors of 630)
- 630 / 2 = 315 (the remainder is 0, so 2 and 315 are divisors of 630)
- 630 / 3 = 210 (the remainder is 0, so 3 and 210 are divisors of 630)
- ...
- 630 / 24 = 26.25 (the remainder is 6, so 24 is not a divisor of 630)
- 630 / 25 = 25.2 (the remainder is 5, so 25 is not a divisor of 630)