What are the divisors of 1626?
1, 2, 3, 6, 271, 542, 813, 1626
- There is a total of 8 positive divisors.
- The sum of these divisors is 3264.
- The arithmetic mean is 408.
4 even divisors
2, 6, 542, 1626
4 odd divisors
1, 3, 271, 813
How to compute the divisors of 1626?
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 1626 by each of the numbers from 1 to 1626 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1626 / 1 = 1626 (the remainder is 0, so 1 is a divisor of 1626)
- 1626 / 2 = 813 (the remainder is 0, so 2 is a divisor of 1626)
- 1626 / 3 = 542 (the remainder is 0, so 3 is a divisor of 1626)
- ...
- 1626 / 1625 = 1.0006153846154 (the remainder is 1, so 1625 is not a divisor of 1626)
- 1626 / 1626 = 1 (the remainder is 0, so 1626 is a divisor of 1626)
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 1626 (i.e. 40.323690307312). 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 )
- 1626 / 1 = 1626 (the remainder is 0, so 1 and 1626 are divisors of 1626)
- 1626 / 2 = 813 (the remainder is 0, so 2 and 813 are divisors of 1626)
- 1626 / 3 = 542 (the remainder is 0, so 3 and 542 are divisors of 1626)
- ...
- 1626 / 39 = 41.692307692308 (the remainder is 27, so 39 is not a divisor of 1626)
- 1626 / 40 = 40.65 (the remainder is 26, so 40 is not a divisor of 1626)