What are the divisors of 5150?
1, 2, 5, 10, 25, 50, 103, 206, 515, 1030, 2575, 5150
- There is a total of 12 positive divisors.
- The sum of these divisors is 9672.
- The arithmetic mean is 806.
6 even divisors
2, 10, 50, 206, 1030, 5150
6 odd divisors
1, 5, 25, 103, 515, 2575
How to compute the divisors of 5150?
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 5150 by each of the numbers from 1 to 5150 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5150 / 1 = 5150 (the remainder is 0, so 1 is a divisor of 5150)
- 5150 / 2 = 2575 (the remainder is 0, so 2 is a divisor of 5150)
- 5150 / 3 = 1716.6666666667 (the remainder is 2, so 3 is not a divisor of 5150)
- ...
- 5150 / 5149 = 1.0001942124684 (the remainder is 1, so 5149 is not a divisor of 5150)
- 5150 / 5150 = 1 (the remainder is 0, so 5150 is a divisor of 5150)
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 5150 (i.e. 71.763500472037). 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 )
- 5150 / 1 = 5150 (the remainder is 0, so 1 and 5150 are divisors of 5150)
- 5150 / 2 = 2575 (the remainder is 0, so 2 and 2575 are divisors of 5150)
- 5150 / 3 = 1716.6666666667 (the remainder is 2, so 3 is not a divisor of 5150)
- ...
- 5150 / 70 = 73.571428571429 (the remainder is 40, so 70 is not a divisor of 5150)
- 5150 / 71 = 72.535211267606 (the remainder is 38, so 71 is not a divisor of 5150)