What are the divisors of 5234?
1, 2, 2617, 5234
- There is a total of 4 positive divisors.
- The sum of these divisors is 7854.
- The arithmetic mean is 1963.5.
2 even divisors
2, 5234
2 odd divisors
1, 2617
How to compute the divisors of 5234?
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 5234 by each of the numbers from 1 to 5234 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5234 / 1 = 5234 (the remainder is 0, so 1 is a divisor of 5234)
- 5234 / 2 = 2617 (the remainder is 0, so 2 is a divisor of 5234)
- 5234 / 3 = 1744.6666666667 (the remainder is 2, so 3 is not a divisor of 5234)
- ...
- 5234 / 5233 = 1.0001910949742 (the remainder is 1, so 5233 is not a divisor of 5234)
- 5234 / 5234 = 1 (the remainder is 0, so 5234 is a divisor of 5234)
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 5234 (i.e. 72.346388990744). 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 )
- 5234 / 1 = 5234 (the remainder is 0, so 1 and 5234 are divisors of 5234)
- 5234 / 2 = 2617 (the remainder is 0, so 2 and 2617 are divisors of 5234)
- 5234 / 3 = 1744.6666666667 (the remainder is 2, so 3 is not a divisor of 5234)
- ...
- 5234 / 71 = 73.718309859155 (the remainder is 51, so 71 is not a divisor of 5234)
- 5234 / 72 = 72.694444444444 (the remainder is 50, so 72 is not a divisor of 5234)