What are the divisors of 5886?
1, 2, 3, 6, 9, 18, 27, 54, 109, 218, 327, 654, 981, 1962, 2943, 5886
- There is a total of 16 positive divisors.
- The sum of these divisors is 13200.
- The arithmetic mean is 825.
8 even divisors
2, 6, 18, 54, 218, 654, 1962, 5886
8 odd divisors
1, 3, 9, 27, 109, 327, 981, 2943
How to compute the divisors of 5886?
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 5886 by each of the numbers from 1 to 5886 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5886 / 1 = 5886 (the remainder is 0, so 1 is a divisor of 5886)
- 5886 / 2 = 2943 (the remainder is 0, so 2 is a divisor of 5886)
- 5886 / 3 = 1962 (the remainder is 0, so 3 is a divisor of 5886)
- ...
- 5886 / 5885 = 1.0001699235344 (the remainder is 1, so 5885 is not a divisor of 5886)
- 5886 / 5886 = 1 (the remainder is 0, so 5886 is a divisor of 5886)
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 5886 (i.e. 76.720271115267). 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 )
- 5886 / 1 = 5886 (the remainder is 0, so 1 and 5886 are divisors of 5886)
- 5886 / 2 = 2943 (the remainder is 0, so 2 and 2943 are divisors of 5886)
- 5886 / 3 = 1962 (the remainder is 0, so 3 and 1962 are divisors of 5886)
- ...
- 5886 / 75 = 78.48 (the remainder is 36, so 75 is not a divisor of 5886)
- 5886 / 76 = 77.447368421053 (the remainder is 34, so 76 is not a divisor of 5886)