What are the divisors of 1866?
1, 2, 3, 6, 311, 622, 933, 1866
- There is a total of 8 positive divisors.
- The sum of these divisors is 3744.
- The arithmetic mean is 468.
4 even divisors
2, 6, 622, 1866
4 odd divisors
1, 3, 311, 933
How to compute the divisors of 1866?
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 1866 by each of the numbers from 1 to 1866 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1866 / 1 = 1866 (the remainder is 0, so 1 is a divisor of 1866)
- 1866 / 2 = 933 (the remainder is 0, so 2 is a divisor of 1866)
- 1866 / 3 = 622 (the remainder is 0, so 3 is a divisor of 1866)
- ...
- 1866 / 1865 = 1.0005361930295 (the remainder is 1, so 1865 is not a divisor of 1866)
- 1866 / 1866 = 1 (the remainder is 0, so 1866 is a divisor of 1866)
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 1866 (i.e. 43.19722213291). 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 )
- 1866 / 1 = 1866 (the remainder is 0, so 1 and 1866 are divisors of 1866)
- 1866 / 2 = 933 (the remainder is 0, so 2 and 933 are divisors of 1866)
- 1866 / 3 = 622 (the remainder is 0, so 3 and 622 are divisors of 1866)
- ...
- 1866 / 42 = 44.428571428571 (the remainder is 18, so 42 is not a divisor of 1866)
- 1866 / 43 = 43.395348837209 (the remainder is 17, so 43 is not a divisor of 1866)