What are the divisors of 1862?
1, 2, 7, 14, 19, 38, 49, 98, 133, 266, 931, 1862
- There is a total of 12 positive divisors.
- The sum of these divisors is 3420.
- The arithmetic mean is 285.
6 even divisors
2, 14, 38, 98, 266, 1862
6 odd divisors
1, 7, 19, 49, 133, 931
How to compute the divisors of 1862?
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 1862 by each of the numbers from 1 to 1862 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1862 / 1 = 1862 (the remainder is 0, so 1 is a divisor of 1862)
- 1862 / 2 = 931 (the remainder is 0, so 2 is a divisor of 1862)
- 1862 / 3 = 620.66666666667 (the remainder is 2, so 3 is not a divisor of 1862)
- ...
- 1862 / 1861 = 1.0005373455132 (the remainder is 1, so 1861 is not a divisor of 1862)
- 1862 / 1862 = 1 (the remainder is 0, so 1862 is a divisor of 1862)
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 1862 (i.e. 43.150898020783). 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 )
- 1862 / 1 = 1862 (the remainder is 0, so 1 and 1862 are divisors of 1862)
- 1862 / 2 = 931 (the remainder is 0, so 2 and 931 are divisors of 1862)
- 1862 / 3 = 620.66666666667 (the remainder is 2, so 3 is not a divisor of 1862)
- ...
- 1862 / 42 = 44.333333333333 (the remainder is 14, so 42 is not a divisor of 1862)
- 1862 / 43 = 43.302325581395 (the remainder is 13, so 43 is not a divisor of 1862)