What are the divisors of 5318?
1, 2, 2659, 5318
- There is a total of 4 positive divisors.
- The sum of these divisors is 7980.
- The arithmetic mean is 1995.
2 even divisors
2, 5318
2 odd divisors
1, 2659
How to compute the divisors of 5318?
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 5318 by each of the numbers from 1 to 5318 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5318 / 1 = 5318 (the remainder is 0, so 1 is a divisor of 5318)
- 5318 / 2 = 2659 (the remainder is 0, so 2 is a divisor of 5318)
- 5318 / 3 = 1772.6666666667 (the remainder is 2, so 3 is not a divisor of 5318)
- ...
- 5318 / 5317 = 1.0001880759827 (the remainder is 1, so 5317 is not a divisor of 5318)
- 5318 / 5318 = 1 (the remainder is 0, so 5318 is a divisor of 5318)
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 5318 (i.e. 72.924618614018). 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 )
- 5318 / 1 = 5318 (the remainder is 0, so 1 and 5318 are divisors of 5318)
- 5318 / 2 = 2659 (the remainder is 0, so 2 and 2659 are divisors of 5318)
- 5318 / 3 = 1772.6666666667 (the remainder is 2, so 3 is not a divisor of 5318)
- ...
- 5318 / 71 = 74.901408450704 (the remainder is 64, so 71 is not a divisor of 5318)
- 5318 / 72 = 73.861111111111 (the remainder is 62, so 72 is not a divisor of 5318)