What are the divisors of 5070?
1, 2, 3, 5, 6, 10, 13, 15, 26, 30, 39, 65, 78, 130, 169, 195, 338, 390, 507, 845, 1014, 1690, 2535, 5070
- There is a total of 24 positive divisors.
- The sum of these divisors is 13176.
- The arithmetic mean is 549.
12 even divisors
2, 6, 10, 26, 30, 78, 130, 338, 390, 1014, 1690, 5070
12 odd divisors
1, 3, 5, 13, 15, 39, 65, 169, 195, 507, 845, 2535
How to compute the divisors of 5070?
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 5070 by each of the numbers from 1 to 5070 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5070 / 1 = 5070 (the remainder is 0, so 1 is a divisor of 5070)
- 5070 / 2 = 2535 (the remainder is 0, so 2 is a divisor of 5070)
- 5070 / 3 = 1690 (the remainder is 0, so 3 is a divisor of 5070)
- ...
- 5070 / 5069 = 1.0001972775695 (the remainder is 1, so 5069 is not a divisor of 5070)
- 5070 / 5070 = 1 (the remainder is 0, so 5070 is a divisor of 5070)
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 5070 (i.e. 71.203932475672). 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 )
- 5070 / 1 = 5070 (the remainder is 0, so 1 and 5070 are divisors of 5070)
- 5070 / 2 = 2535 (the remainder is 0, so 2 and 2535 are divisors of 5070)
- 5070 / 3 = 1690 (the remainder is 0, so 3 and 1690 are divisors of 5070)
- ...
- 5070 / 70 = 72.428571428571 (the remainder is 30, so 70 is not a divisor of 5070)
- 5070 / 71 = 71.408450704225 (the remainder is 29, so 71 is not a divisor of 5070)