What are the divisors of 8022?
1, 2, 3, 6, 7, 14, 21, 42, 191, 382, 573, 1146, 1337, 2674, 4011, 8022
- There is a total of 16 positive divisors.
- The sum of these divisors is 18432.
- The arithmetic mean is 1152.
8 even divisors
2, 6, 14, 42, 382, 1146, 2674, 8022
8 odd divisors
1, 3, 7, 21, 191, 573, 1337, 4011
How to compute the divisors of 8022?
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 8022 by each of the numbers from 1 to 8022 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 8022 / 1 = 8022 (the remainder is 0, so 1 is a divisor of 8022)
- 8022 / 2 = 4011 (the remainder is 0, so 2 is a divisor of 8022)
- 8022 / 3 = 2674 (the remainder is 0, so 3 is a divisor of 8022)
- ...
- 8022 / 8021 = 1.0001246727341 (the remainder is 1, so 8021 is not a divisor of 8022)
- 8022 / 8022 = 1 (the remainder is 0, so 8022 is a divisor of 8022)
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 8022 (i.e. 89.565618403492). 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 )
- 8022 / 1 = 8022 (the remainder is 0, so 1 and 8022 are divisors of 8022)
- 8022 / 2 = 4011 (the remainder is 0, so 2 and 4011 are divisors of 8022)
- 8022 / 3 = 2674 (the remainder is 0, so 3 and 2674 are divisors of 8022)
- ...
- 8022 / 88 = 91.159090909091 (the remainder is 14, so 88 is not a divisor of 8022)
- 8022 / 89 = 90.134831460674 (the remainder is 12, so 89 is not a divisor of 8022)