What are the divisors of 5276?
1, 2, 4, 1319, 2638, 5276
- There is a total of 6 positive divisors.
- The sum of these divisors is 9240.
- The arithmetic mean is 1540.
4 even divisors
2, 4, 2638, 5276
2 odd divisors
1, 1319
How to compute the divisors of 5276?
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 5276 by each of the numbers from 1 to 5276 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5276 / 1 = 5276 (the remainder is 0, so 1 is a divisor of 5276)
- 5276 / 2 = 2638 (the remainder is 0, so 2 is a divisor of 5276)
- 5276 / 3 = 1758.6666666667 (the remainder is 2, so 3 is not a divisor of 5276)
- ...
- 5276 / 5275 = 1.0001895734597 (the remainder is 1, so 5275 is not a divisor of 5276)
- 5276 / 5276 = 1 (the remainder is 0, so 5276 is a divisor of 5276)
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 5276 (i.e. 72.63607918934). 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 )
- 5276 / 1 = 5276 (the remainder is 0, so 1 and 5276 are divisors of 5276)
- 5276 / 2 = 2638 (the remainder is 0, so 2 and 2638 are divisors of 5276)
- 5276 / 3 = 1758.6666666667 (the remainder is 2, so 3 is not a divisor of 5276)
- ...
- 5276 / 71 = 74.30985915493 (the remainder is 22, so 71 is not a divisor of 5276)
- 5276 / 72 = 73.277777777778 (the remainder is 20, so 72 is not a divisor of 5276)