What are the divisors of 66?
1, 2, 3, 6, 11, 22, 33, 66
- There is a total of 8 positive divisors.
- The sum of these divisors is 144.
- The arithmetic mean is 18.
4 even divisors
2, 6, 22, 66
4 odd divisors
1, 3, 11, 33
How to compute the divisors of 66?
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 66 by each of the numbers from 1 to 66 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 66 / 1 = 66 (the remainder is 0, so 1 is a divisor of 66)
- 66 / 2 = 33 (the remainder is 0, so 2 is a divisor of 66)
- 66 / 3 = 22 (the remainder is 0, so 3 is a divisor of 66)
- ...
- 66 / 65 = 1.0153846153846 (the remainder is 1, so 65 is not a divisor of 66)
- 66 / 66 = 1 (the remainder is 0, so 66 is a divisor of 66)
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 66 (i.e. 8.124038404636). 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 )
- 66 / 1 = 66 (the remainder is 0, so 1 and 66 are divisors of 66)
- 66 / 2 = 33 (the remainder is 0, so 2 and 33 are divisors of 66)
- 66 / 3 = 22 (the remainder is 0, so 3 and 22 are divisors of 66)
- ...
- 66 / 7 = 9.4285714285714 (the remainder is 3, so 7 is not a divisor of 66)
- 66 / 8 = 8.25 (the remainder is 2, so 8 is not a divisor of 66)