What are the divisors of 5230?
1, 2, 5, 10, 523, 1046, 2615, 5230
- There is a total of 8 positive divisors.
- The sum of these divisors is 9432.
- The arithmetic mean is 1179.
4 even divisors
2, 10, 1046, 5230
4 odd divisors
1, 5, 523, 2615
How to compute the divisors of 5230?
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 5230 by each of the numbers from 1 to 5230 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5230 / 1 = 5230 (the remainder is 0, so 1 is a divisor of 5230)
- 5230 / 2 = 2615 (the remainder is 0, so 2 is a divisor of 5230)
- 5230 / 3 = 1743.3333333333 (the remainder is 1, so 3 is not a divisor of 5230)
- ...
- 5230 / 5229 = 1.0001912411551 (the remainder is 1, so 5229 is not a divisor of 5230)
- 5230 / 5230 = 1 (the remainder is 0, so 5230 is a divisor of 5230)
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 5230 (i.e. 72.318738927058). 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 )
- 5230 / 1 = 5230 (the remainder is 0, so 1 and 5230 are divisors of 5230)
- 5230 / 2 = 2615 (the remainder is 0, so 2 and 2615 are divisors of 5230)
- 5230 / 3 = 1743.3333333333 (the remainder is 1, so 3 is not a divisor of 5230)
- ...
- 5230 / 71 = 73.661971830986 (the remainder is 47, so 71 is not a divisor of 5230)
- 5230 / 72 = 72.638888888889 (the remainder is 46, so 72 is not a divisor of 5230)