What are the divisors of 5990?
1, 2, 5, 10, 599, 1198, 2995, 5990
- There is a total of 8 positive divisors.
- The sum of these divisors is 10800.
- The arithmetic mean is 1350.
4 even divisors
2, 10, 1198, 5990
4 odd divisors
1, 5, 599, 2995
How to compute the divisors of 5990?
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 5990 by each of the numbers from 1 to 5990 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5990 / 1 = 5990 (the remainder is 0, so 1 is a divisor of 5990)
- 5990 / 2 = 2995 (the remainder is 0, so 2 is a divisor of 5990)
- 5990 / 3 = 1996.6666666667 (the remainder is 2, so 3 is not a divisor of 5990)
- ...
- 5990 / 5989 = 1.0001669727834 (the remainder is 1, so 5989 is not a divisor of 5990)
- 5990 / 5990 = 1 (the remainder is 0, so 5990 is a divisor of 5990)
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 5990 (i.e. 77.395090283557). 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 )
- 5990 / 1 = 5990 (the remainder is 0, so 1 and 5990 are divisors of 5990)
- 5990 / 2 = 2995 (the remainder is 0, so 2 and 2995 are divisors of 5990)
- 5990 / 3 = 1996.6666666667 (the remainder is 2, so 3 is not a divisor of 5990)
- ...
- 5990 / 76 = 78.815789473684 (the remainder is 62, so 76 is not a divisor of 5990)
- 5990 / 77 = 77.792207792208 (the remainder is 61, so 77 is not a divisor of 5990)