What are the divisors of 5170?
1, 2, 5, 10, 11, 22, 47, 55, 94, 110, 235, 470, 517, 1034, 2585, 5170
- There is a total of 16 positive divisors.
- The sum of these divisors is 10368.
- The arithmetic mean is 648.
8 even divisors
2, 10, 22, 94, 110, 470, 1034, 5170
8 odd divisors
1, 5, 11, 47, 55, 235, 517, 2585
How to compute the divisors of 5170?
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 5170 by each of the numbers from 1 to 5170 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5170 / 1 = 5170 (the remainder is 0, so 1 is a divisor of 5170)
- 5170 / 2 = 2585 (the remainder is 0, so 2 is a divisor of 5170)
- 5170 / 3 = 1723.3333333333 (the remainder is 1, so 3 is not a divisor of 5170)
- ...
- 5170 / 5169 = 1.0001934610176 (the remainder is 1, so 5169 is not a divisor of 5170)
- 5170 / 5170 = 1 (the remainder is 0, so 5170 is a divisor of 5170)
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 5170 (i.e. 71.90271204899). 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 )
- 5170 / 1 = 5170 (the remainder is 0, so 1 and 5170 are divisors of 5170)
- 5170 / 2 = 2585 (the remainder is 0, so 2 and 2585 are divisors of 5170)
- 5170 / 3 = 1723.3333333333 (the remainder is 1, so 3 is not a divisor of 5170)
- ...
- 5170 / 70 = 73.857142857143 (the remainder is 60, so 70 is not a divisor of 5170)
- 5170 / 71 = 72.816901408451 (the remainder is 58, so 71 is not a divisor of 5170)