What are the divisors of 22?
1, 2, 11, 22
- There is a total of 4 positive divisors.
- The sum of these divisors is 36.
- The arithmetic mean is 9.
2 even divisors
2, 22
2 odd divisors
1, 11
How to compute the divisors of 22?
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 22 by each of the numbers from 1 to 22 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 22 / 1 = 22 (the remainder is 0, so 1 is a divisor of 22)
- 22 / 2 = 11 (the remainder is 0, so 2 is a divisor of 22)
- 22 / 3 = 7.3333333333333 (the remainder is 1, so 3 is not a divisor of 22)
- ...
- 22 / 4 = 5.5 (the remainder is 2, so 4 is not a divisor of 22)
- 22 / 5 = 4.4 (the remainder is 2, so 5 is not a divisor of 22)
- 22 / 6 = 3.6666666666667 (the remainder is 4, so 6 is not a divisor of 22)
- 22 / 7 = 3.1428571428571 (the remainder is 1, so 7 is not a divisor of 22)
- 22 / 8 = 2.75 (the remainder is 6, so 8 is not a divisor of 22)
- 22 / 9 = 2.4444444444444 (the remainder is 4, so 9 is not a divisor of 22)
- 22 / 10 = 2.2 (the remainder is 2, so 10 is not a divisor of 22)
- 22 / 11 = 2 (the remainder is 0, so 11 is a divisor of 22)
- 22 / 12 = 1.8333333333333 (the remainder is 10, so 12 is not a divisor of 22)
- 22 / 13 = 1.6923076923077 (the remainder is 9, so 13 is not a divisor of 22)
- 22 / 14 = 1.5714285714286 (the remainder is 8, so 14 is not a divisor of 22)
- 22 / 15 = 1.4666666666667 (the remainder is 7, so 15 is not a divisor of 22)
- 22 / 16 = 1.375 (the remainder is 6, so 16 is not a divisor of 22)
- 22 / 17 = 1.2941176470588 (the remainder is 5, so 17 is not a divisor of 22)
- 22 / 18 = 1.2222222222222 (the remainder is 4, so 18 is not a divisor of 22)
- 22 / 19 = 1.1578947368421 (the remainder is 3, so 19 is not a divisor of 22)
- 22 / 20 = 1.1 (the remainder is 2, so 20 is not a divisor of 22)
- 22 / 21 = 1.047619047619 (the remainder is 1, so 21 is not a divisor of 22)
- 22 / 22 = 1 (the remainder is 0, so 22 is a divisor of 22)
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 22 (i.e. 4.6904157598234). 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 )
- 22 / 1 = 22 (the remainder is 0, so 1 and 22 are divisors of 22)
- 22 / 2 = 11 (the remainder is 0, so 2 and 11 are divisors of 22)
- 22 / 3 = 7.3333333333333 (the remainder is 1, so 3 is not a divisor of 22)
- ...
- 22 / 4 = 5.5 (the remainder is 2, so 4 is not a divisor of 22)