What are the divisors of 5135?
1, 5, 13, 65, 79, 395, 1027, 5135
- There is a total of 8 positive divisors.
- The sum of these divisors is 6720.
- The arithmetic mean is 840.
8 odd divisors
1, 5, 13, 65, 79, 395, 1027, 5135
How to compute the divisors of 5135?
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 5135 by each of the numbers from 1 to 5135 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5135 / 1 = 5135 (the remainder is 0, so 1 is a divisor of 5135)
- 5135 / 2 = 2567.5 (the remainder is 1, so 2 is not a divisor of 5135)
- 5135 / 3 = 1711.6666666667 (the remainder is 2, so 3 is not a divisor of 5135)
- ...
- 5135 / 5134 = 1.0001947798987 (the remainder is 1, so 5134 is not a divisor of 5135)
- 5135 / 5135 = 1 (the remainder is 0, so 5135 is a divisor of 5135)
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 5135 (i.e. 71.658914309387). 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 )
- 5135 / 1 = 5135 (the remainder is 0, so 1 and 5135 are divisors of 5135)
- 5135 / 2 = 2567.5 (the remainder is 1, so 2 is not a divisor of 5135)
- 5135 / 3 = 1711.6666666667 (the remainder is 2, so 3 is not a divisor of 5135)
- ...
- 5135 / 70 = 73.357142857143 (the remainder is 25, so 70 is not a divisor of 5135)
- 5135 / 71 = 72.323943661972 (the remainder is 23, so 71 is not a divisor of 5135)