What are the divisors of 5786?
1, 2, 11, 22, 263, 526, 2893, 5786
- There is a total of 8 positive divisors.
- The sum of these divisors is 9504.
- The arithmetic mean is 1188.
4 even divisors
2, 22, 526, 5786
4 odd divisors
1, 11, 263, 2893
How to compute the divisors of 5786?
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 5786 by each of the numbers from 1 to 5786 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5786 / 1 = 5786 (the remainder is 0, so 1 is a divisor of 5786)
- 5786 / 2 = 2893 (the remainder is 0, so 2 is a divisor of 5786)
- 5786 / 3 = 1928.6666666667 (the remainder is 2, so 3 is not a divisor of 5786)
- ...
- 5786 / 5785 = 1.000172860847 (the remainder is 1, so 5785 is not a divisor of 5786)
- 5786 / 5786 = 1 (the remainder is 0, so 5786 is a divisor of 5786)
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 5786 (i.e. 76.065761022946). 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 )
- 5786 / 1 = 5786 (the remainder is 0, so 1 and 5786 are divisors of 5786)
- 5786 / 2 = 2893 (the remainder is 0, so 2 and 2893 are divisors of 5786)
- 5786 / 3 = 1928.6666666667 (the remainder is 2, so 3 is not a divisor of 5786)
- ...
- 5786 / 75 = 77.146666666667 (the remainder is 11, so 75 is not a divisor of 5786)
- 5786 / 76 = 76.131578947368 (the remainder is 10, so 76 is not a divisor of 5786)