What are the divisors of 8238?
1, 2, 3, 6, 1373, 2746, 4119, 8238
- There is a total of 8 positive divisors.
- The sum of these divisors is 16488.
- The arithmetic mean is 2061.
4 even divisors
2, 6, 2746, 8238
4 odd divisors
1, 3, 1373, 4119
How to compute the divisors of 8238?
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 8238 by each of the numbers from 1 to 8238 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 8238 / 1 = 8238 (the remainder is 0, so 1 is a divisor of 8238)
- 8238 / 2 = 4119 (the remainder is 0, so 2 is a divisor of 8238)
- 8238 / 3 = 2746 (the remainder is 0, so 3 is a divisor of 8238)
- ...
- 8238 / 8237 = 1.0001214034236 (the remainder is 1, so 8237 is not a divisor of 8238)
- 8238 / 8238 = 1 (the remainder is 0, so 8238 is a divisor of 8238)
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 8238 (i.e. 90.763428758504). 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 )
- 8238 / 1 = 8238 (the remainder is 0, so 1 and 8238 are divisors of 8238)
- 8238 / 2 = 4119 (the remainder is 0, so 2 and 4119 are divisors of 8238)
- 8238 / 3 = 2746 (the remainder is 0, so 3 and 2746 are divisors of 8238)
- ...
- 8238 / 89 = 92.561797752809 (the remainder is 50, so 89 is not a divisor of 8238)
- 8238 / 90 = 91.533333333333 (the remainder is 48, so 90 is not a divisor of 8238)