What are the divisors of 5085?
1, 3, 5, 9, 15, 45, 113, 339, 565, 1017, 1695, 5085
- There is a total of 12 positive divisors.
- The sum of these divisors is 8892.
- The arithmetic mean is 741.
12 odd divisors
1, 3, 5, 9, 15, 45, 113, 339, 565, 1017, 1695, 5085
How to compute the divisors of 5085?
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 5085 by each of the numbers from 1 to 5085 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5085 / 1 = 5085 (the remainder is 0, so 1 is a divisor of 5085)
- 5085 / 2 = 2542.5 (the remainder is 1, so 2 is not a divisor of 5085)
- 5085 / 3 = 1695 (the remainder is 0, so 3 is a divisor of 5085)
- ...
- 5085 / 5084 = 1.0001966955153 (the remainder is 1, so 5084 is not a divisor of 5085)
- 5085 / 5085 = 1 (the remainder is 0, so 5085 is a divisor of 5085)
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 5085 (i.e. 71.309185944028). 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 )
- 5085 / 1 = 5085 (the remainder is 0, so 1 and 5085 are divisors of 5085)
- 5085 / 2 = 2542.5 (the remainder is 1, so 2 is not a divisor of 5085)
- 5085 / 3 = 1695 (the remainder is 0, so 3 and 1695 are divisors of 5085)
- ...
- 5085 / 70 = 72.642857142857 (the remainder is 45, so 70 is not a divisor of 5085)
- 5085 / 71 = 71.619718309859 (the remainder is 44, so 71 is not a divisor of 5085)