What are the divisors of 8242?
1, 2, 13, 26, 317, 634, 4121, 8242
- There is a total of 8 positive divisors.
- The sum of these divisors is 13356.
- The arithmetic mean is 1669.5.
4 even divisors
2, 26, 634, 8242
4 odd divisors
1, 13, 317, 4121
How to compute the divisors of 8242?
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 8242 by each of the numbers from 1 to 8242 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 8242 / 1 = 8242 (the remainder is 0, so 1 is a divisor of 8242)
- 8242 / 2 = 4121 (the remainder is 0, so 2 is a divisor of 8242)
- 8242 / 3 = 2747.3333333333 (the remainder is 1, so 3 is not a divisor of 8242)
- ...
- 8242 / 8241 = 1.000121344497 (the remainder is 1, so 8241 is not a divisor of 8242)
- 8242 / 8242 = 1 (the remainder is 0, so 8242 is a divisor of 8242)
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 8242 (i.e. 90.785461391128). 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 )
- 8242 / 1 = 8242 (the remainder is 0, so 1 and 8242 are divisors of 8242)
- 8242 / 2 = 4121 (the remainder is 0, so 2 and 4121 are divisors of 8242)
- 8242 / 3 = 2747.3333333333 (the remainder is 1, so 3 is not a divisor of 8242)
- ...
- 8242 / 89 = 92.606741573034 (the remainder is 54, so 89 is not a divisor of 8242)
- 8242 / 90 = 91.577777777778 (the remainder is 52, so 90 is not a divisor of 8242)