What are the divisors of 8196?
1, 2, 3, 4, 6, 12, 683, 1366, 2049, 2732, 4098, 8196
- There is a total of 12 positive divisors.
- The sum of these divisors is 19152.
- The arithmetic mean is 1596.
8 even divisors
2, 4, 6, 12, 1366, 2732, 4098, 8196
4 odd divisors
1, 3, 683, 2049
How to compute the divisors of 8196?
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 8196 by each of the numbers from 1 to 8196 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 8196 / 1 = 8196 (the remainder is 0, so 1 is a divisor of 8196)
- 8196 / 2 = 4098 (the remainder is 0, so 2 is a divisor of 8196)
- 8196 / 3 = 2732 (the remainder is 0, so 3 is a divisor of 8196)
- ...
- 8196 / 8195 = 1.0001220256254 (the remainder is 1, so 8195 is not a divisor of 8196)
- 8196 / 8196 = 1 (the remainder is 0, so 8196 is a divisor of 8196)
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 8196 (i.e. 90.53176238205). 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 )
- 8196 / 1 = 8196 (the remainder is 0, so 1 and 8196 are divisors of 8196)
- 8196 / 2 = 4098 (the remainder is 0, so 2 and 4098 are divisors of 8196)
- 8196 / 3 = 2732 (the remainder is 0, so 3 and 2732 are divisors of 8196)
- ...
- 8196 / 89 = 92.089887640449 (the remainder is 8, so 89 is not a divisor of 8196)
- 8196 / 90 = 91.066666666667 (the remainder is 6, so 90 is not a divisor of 8196)