What are the divisors of 5995?
1, 5, 11, 55, 109, 545, 1199, 5995
- There is a total of 8 positive divisors.
- The sum of these divisors is 7920.
- The arithmetic mean is 990.
8 odd divisors
1, 5, 11, 55, 109, 545, 1199, 5995
How to compute the divisors of 5995?
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 5995 by each of the numbers from 1 to 5995 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5995 / 1 = 5995 (the remainder is 0, so 1 is a divisor of 5995)
- 5995 / 2 = 2997.5 (the remainder is 1, so 2 is not a divisor of 5995)
- 5995 / 3 = 1998.3333333333 (the remainder is 1, so 3 is not a divisor of 5995)
- ...
- 5995 / 5994 = 1.0001668335002 (the remainder is 1, so 5994 is not a divisor of 5995)
- 5995 / 5995 = 1 (the remainder is 0, so 5995 is a divisor of 5995)
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 5995 (i.e. 77.427385336197). 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 )
- 5995 / 1 = 5995 (the remainder is 0, so 1 and 5995 are divisors of 5995)
- 5995 / 2 = 2997.5 (the remainder is 1, so 2 is not a divisor of 5995)
- 5995 / 3 = 1998.3333333333 (the remainder is 1, so 3 is not a divisor of 5995)
- ...
- 5995 / 76 = 78.881578947368 (the remainder is 67, so 76 is not a divisor of 5995)
- 5995 / 77 = 77.857142857143 (the remainder is 66, so 77 is not a divisor of 5995)