What are the divisors of 9238?
1, 2, 31, 62, 149, 298, 4619, 9238
- There is a total of 8 positive divisors.
- The sum of these divisors is 14400.
- The arithmetic mean is 1800.
4 even divisors
2, 62, 298, 9238
4 odd divisors
1, 31, 149, 4619
How to compute the divisors of 9238?
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 9238 by each of the numbers from 1 to 9238 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 9238 / 1 = 9238 (the remainder is 0, so 1 is a divisor of 9238)
- 9238 / 2 = 4619 (the remainder is 0, so 2 is a divisor of 9238)
- 9238 / 3 = 3079.3333333333 (the remainder is 1, so 3 is not a divisor of 9238)
- ...
- 9238 / 9237 = 1.0001082602577 (the remainder is 1, so 9237 is not a divisor of 9238)
- 9238 / 9238 = 1 (the remainder is 0, so 9238 is a divisor of 9238)
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 9238 (i.e. 96.11451503285). 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 )
- 9238 / 1 = 9238 (the remainder is 0, so 1 and 9238 are divisors of 9238)
- 9238 / 2 = 4619 (the remainder is 0, so 2 and 4619 are divisors of 9238)
- 9238 / 3 = 3079.3333333333 (the remainder is 1, so 3 is not a divisor of 9238)
- ...
- 9238 / 95 = 97.242105263158 (the remainder is 23, so 95 is not a divisor of 9238)
- 9238 / 96 = 96.229166666667 (the remainder is 22, so 96 is not a divisor of 9238)