What are the divisors of 5278?
1, 2, 7, 13, 14, 26, 29, 58, 91, 182, 203, 377, 406, 754, 2639, 5278
- There is a total of 16 positive divisors.
- The sum of these divisors is 10080.
- The arithmetic mean is 630.
8 even divisors
2, 14, 26, 58, 182, 406, 754, 5278
8 odd divisors
1, 7, 13, 29, 91, 203, 377, 2639
How to compute the divisors of 5278?
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 5278 by each of the numbers from 1 to 5278 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5278 / 1 = 5278 (the remainder is 0, so 1 is a divisor of 5278)
- 5278 / 2 = 2639 (the remainder is 0, so 2 is a divisor of 5278)
- 5278 / 3 = 1759.3333333333 (the remainder is 1, so 3 is not a divisor of 5278)
- ...
- 5278 / 5277 = 1.0001895016108 (the remainder is 1, so 5277 is not a divisor of 5278)
- 5278 / 5278 = 1 (the remainder is 0, so 5278 is a divisor of 5278)
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 5278 (i.e. 72.649845147805). 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 )
- 5278 / 1 = 5278 (the remainder is 0, so 1 and 5278 are divisors of 5278)
- 5278 / 2 = 2639 (the remainder is 0, so 2 and 2639 are divisors of 5278)
- 5278 / 3 = 1759.3333333333 (the remainder is 1, so 3 is not a divisor of 5278)
- ...
- 5278 / 71 = 74.338028169014 (the remainder is 24, so 71 is not a divisor of 5278)
- 5278 / 72 = 73.305555555556 (the remainder is 22, so 72 is not a divisor of 5278)