What are the divisors of 5314?
1, 2, 2657, 5314
- There is a total of 4 positive divisors.
- The sum of these divisors is 7974.
- The arithmetic mean is 1993.5.
2 even divisors
2, 5314
2 odd divisors
1, 2657
How to compute the divisors of 5314?
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 5314 by each of the numbers from 1 to 5314 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5314 / 1 = 5314 (the remainder is 0, so 1 is a divisor of 5314)
- 5314 / 2 = 2657 (the remainder is 0, so 2 is a divisor of 5314)
- 5314 / 3 = 1771.3333333333 (the remainder is 1, so 3 is not a divisor of 5314)
- ...
- 5314 / 5313 = 1.0001882175795 (the remainder is 1, so 5313 is not a divisor of 5314)
- 5314 / 5314 = 1 (the remainder is 0, so 5314 is a divisor of 5314)
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 5314 (i.e. 72.89718787443). 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 )
- 5314 / 1 = 5314 (the remainder is 0, so 1 and 5314 are divisors of 5314)
- 5314 / 2 = 2657 (the remainder is 0, so 2 and 2657 are divisors of 5314)
- 5314 / 3 = 1771.3333333333 (the remainder is 1, so 3 is not a divisor of 5314)
- ...
- 5314 / 71 = 74.845070422535 (the remainder is 60, so 71 is not a divisor of 5314)
- 5314 / 72 = 73.805555555556 (the remainder is 58, so 72 is not a divisor of 5314)