What are the divisors of 5812?
1, 2, 4, 1453, 2906, 5812
- There is a total of 6 positive divisors.
- The sum of these divisors is 10178.
- The arithmetic mean is 1696.3333333333.
4 even divisors
2, 4, 2906, 5812
2 odd divisors
1, 1453
How to compute the divisors of 5812?
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 5812 by each of the numbers from 1 to 5812 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5812 / 1 = 5812 (the remainder is 0, so 1 is a divisor of 5812)
- 5812 / 2 = 2906 (the remainder is 0, so 2 is a divisor of 5812)
- 5812 / 3 = 1937.3333333333 (the remainder is 1, so 3 is not a divisor of 5812)
- ...
- 5812 / 5811 = 1.0001720874204 (the remainder is 1, so 5811 is not a divisor of 5812)
- 5812 / 5812 = 1 (the remainder is 0, so 5812 is a divisor of 5812)
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 5812 (i.e. 76.236474210184). 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 )
- 5812 / 1 = 5812 (the remainder is 0, so 1 and 5812 are divisors of 5812)
- 5812 / 2 = 2906 (the remainder is 0, so 2 and 2906 are divisors of 5812)
- 5812 / 3 = 1937.3333333333 (the remainder is 1, so 3 is not a divisor of 5812)
- ...
- 5812 / 75 = 77.493333333333 (the remainder is 37, so 75 is not a divisor of 5812)
- 5812 / 76 = 76.473684210526 (the remainder is 36, so 76 is not a divisor of 5812)