What are the divisors of 9638?
1, 2, 61, 79, 122, 158, 4819, 9638
- There is a total of 8 positive divisors.
- The sum of these divisors is 14880.
- The arithmetic mean is 1860.
4 even divisors
2, 122, 158, 9638
4 odd divisors
1, 61, 79, 4819
How to compute the divisors of 9638?
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 9638 by each of the numbers from 1 to 9638 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 9638 / 1 = 9638 (the remainder is 0, so 1 is a divisor of 9638)
- 9638 / 2 = 4819 (the remainder is 0, so 2 is a divisor of 9638)
- 9638 / 3 = 3212.6666666667 (the remainder is 2, so 3 is not a divisor of 9638)
- ...
- 9638 / 9637 = 1.0001037667324 (the remainder is 1, so 9637 is not a divisor of 9638)
- 9638 / 9638 = 1 (the remainder is 0, so 9638 is a divisor of 9638)
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 9638 (i.e. 98.173316130199). 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 )
- 9638 / 1 = 9638 (the remainder is 0, so 1 and 9638 are divisors of 9638)
- 9638 / 2 = 4819 (the remainder is 0, so 2 and 4819 are divisors of 9638)
- 9638 / 3 = 3212.6666666667 (the remainder is 2, so 3 is not a divisor of 9638)
- ...
- 9638 / 97 = 99.360824742268 (the remainder is 35, so 97 is not a divisor of 9638)
- 9638 / 98 = 98.34693877551 (the remainder is 34, so 98 is not a divisor of 9638)