What are the divisors of 5802?
1, 2, 3, 6, 967, 1934, 2901, 5802
- There is a total of 8 positive divisors.
- The sum of these divisors is 11616.
- The arithmetic mean is 1452.
4 even divisors
2, 6, 1934, 5802
4 odd divisors
1, 3, 967, 2901
How to compute the divisors of 5802?
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 5802 by each of the numbers from 1 to 5802 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5802 / 1 = 5802 (the remainder is 0, so 1 is a divisor of 5802)
- 5802 / 2 = 2901 (the remainder is 0, so 2 is a divisor of 5802)
- 5802 / 3 = 1934 (the remainder is 0, so 3 is a divisor of 5802)
- ...
- 5802 / 5801 = 1.0001723840717 (the remainder is 1, so 5801 is not a divisor of 5802)
- 5802 / 5802 = 1 (the remainder is 0, so 5802 is a divisor of 5802)
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 5802 (i.e. 76.170860570168). 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 )
- 5802 / 1 = 5802 (the remainder is 0, so 1 and 5802 are divisors of 5802)
- 5802 / 2 = 2901 (the remainder is 0, so 2 and 2901 are divisors of 5802)
- 5802 / 3 = 1934 (the remainder is 0, so 3 and 1934 are divisors of 5802)
- ...
- 5802 / 75 = 77.36 (the remainder is 27, so 75 is not a divisor of 5802)
- 5802 / 76 = 76.342105263158 (the remainder is 26, so 76 is not a divisor of 5802)