What are the divisors of 8126?
1, 2, 17, 34, 239, 478, 4063, 8126
- There is a total of 8 positive divisors.
- The sum of these divisors is 12960.
- The arithmetic mean is 1620.
4 even divisors
2, 34, 478, 8126
4 odd divisors
1, 17, 239, 4063
How to compute the divisors of 8126?
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 8126 by each of the numbers from 1 to 8126 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 8126 / 1 = 8126 (the remainder is 0, so 1 is a divisor of 8126)
- 8126 / 2 = 4063 (the remainder is 0, so 2 is a divisor of 8126)
- 8126 / 3 = 2708.6666666667 (the remainder is 2, so 3 is not a divisor of 8126)
- ...
- 8126 / 8125 = 1.0001230769231 (the remainder is 1, so 8125 is not a divisor of 8126)
- 8126 / 8126 = 1 (the remainder is 0, so 8126 is a divisor of 8126)
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 8126 (i.e. 90.144328717896). 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 )
- 8126 / 1 = 8126 (the remainder is 0, so 1 and 8126 are divisors of 8126)
- 8126 / 2 = 4063 (the remainder is 0, so 2 and 4063 are divisors of 8126)
- 8126 / 3 = 2708.6666666667 (the remainder is 2, so 3 is not a divisor of 8126)
- ...
- 8126 / 89 = 91.303370786517 (the remainder is 27, so 89 is not a divisor of 8126)
- 8126 / 90 = 90.288888888889 (the remainder is 26, so 90 is not a divisor of 8126)