What are the divisors of 5962?
1, 2, 11, 22, 271, 542, 2981, 5962
- There is a total of 8 positive divisors.
- The sum of these divisors is 9792.
- The arithmetic mean is 1224.
4 even divisors
2, 22, 542, 5962
4 odd divisors
1, 11, 271, 2981
How to compute the divisors of 5962?
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 5962 by each of the numbers from 1 to 5962 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5962 / 1 = 5962 (the remainder is 0, so 1 is a divisor of 5962)
- 5962 / 2 = 2981 (the remainder is 0, so 2 is a divisor of 5962)
- 5962 / 3 = 1987.3333333333 (the remainder is 1, so 3 is not a divisor of 5962)
- ...
- 5962 / 5961 = 1.0001677570877 (the remainder is 1, so 5961 is not a divisor of 5962)
- 5962 / 5962 = 1 (the remainder is 0, so 5962 is a divisor of 5962)
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 5962 (i.e. 77.213988369984). 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 )
- 5962 / 1 = 5962 (the remainder is 0, so 1 and 5962 are divisors of 5962)
- 5962 / 2 = 2981 (the remainder is 0, so 2 and 2981 are divisors of 5962)
- 5962 / 3 = 1987.3333333333 (the remainder is 1, so 3 is not a divisor of 5962)
- ...
- 5962 / 76 = 78.447368421053 (the remainder is 34, so 76 is not a divisor of 5962)
- 5962 / 77 = 77.428571428571 (the remainder is 33, so 77 is not a divisor of 5962)