What are the divisors of 5134?
1, 2, 17, 34, 151, 302, 2567, 5134
- There is a total of 8 positive divisors.
- The sum of these divisors is 8208.
- The arithmetic mean is 1026.
4 even divisors
2, 34, 302, 5134
4 odd divisors
1, 17, 151, 2567
How to compute the divisors of 5134?
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 5134 by each of the numbers from 1 to 5134 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5134 / 1 = 5134 (the remainder is 0, so 1 is a divisor of 5134)
- 5134 / 2 = 2567 (the remainder is 0, so 2 is a divisor of 5134)
- 5134 / 3 = 1711.3333333333 (the remainder is 1, so 3 is not a divisor of 5134)
- ...
- 5134 / 5133 = 1.0001948178453 (the remainder is 1, so 5133 is not a divisor of 5134)
- 5134 / 5134 = 1 (the remainder is 0, so 5134 is a divisor of 5134)
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 5134 (i.e. 71.651936470691). 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 )
- 5134 / 1 = 5134 (the remainder is 0, so 1 and 5134 are divisors of 5134)
- 5134 / 2 = 2567 (the remainder is 0, so 2 and 2567 are divisors of 5134)
- 5134 / 3 = 1711.3333333333 (the remainder is 1, so 3 is not a divisor of 5134)
- ...
- 5134 / 70 = 73.342857142857 (the remainder is 24, so 70 is not a divisor of 5134)
- 5134 / 71 = 72.30985915493 (the remainder is 22, so 71 is not a divisor of 5134)