What are the divisors of 8166?
1, 2, 3, 6, 1361, 2722, 4083, 8166
- There is a total of 8 positive divisors.
- The sum of these divisors is 16344.
- The arithmetic mean is 2043.
4 even divisors
2, 6, 2722, 8166
4 odd divisors
1, 3, 1361, 4083
How to compute the divisors of 8166?
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 8166 by each of the numbers from 1 to 8166 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 8166 / 1 = 8166 (the remainder is 0, so 1 is a divisor of 8166)
- 8166 / 2 = 4083 (the remainder is 0, so 2 is a divisor of 8166)
- 8166 / 3 = 2722 (the remainder is 0, so 3 is a divisor of 8166)
- ...
- 8166 / 8165 = 1.0001224739743 (the remainder is 1, so 8165 is not a divisor of 8166)
- 8166 / 8166 = 1 (the remainder is 0, so 8166 is a divisor of 8166)
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 8166 (i.e. 90.365922780659). 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 )
- 8166 / 1 = 8166 (the remainder is 0, so 1 and 8166 are divisors of 8166)
- 8166 / 2 = 4083 (the remainder is 0, so 2 and 4083 are divisors of 8166)
- 8166 / 3 = 2722 (the remainder is 0, so 3 and 2722 are divisors of 8166)
- ...
- 8166 / 89 = 91.752808988764 (the remainder is 67, so 89 is not a divisor of 8166)
- 8166 / 90 = 90.733333333333 (the remainder is 66, so 90 is not a divisor of 8166)