What are the divisors of 8112?
1, 2, 3, 4, 6, 8, 12, 13, 16, 24, 26, 39, 48, 52, 78, 104, 156, 169, 208, 312, 338, 507, 624, 676, 1014, 1352, 2028, 2704, 4056, 8112
- There is a total of 30 positive divisors.
- The sum of these divisors is 22692.
- The arithmetic mean is 756.4.
24 even divisors
2, 4, 6, 8, 12, 16, 24, 26, 48, 52, 78, 104, 156, 208, 312, 338, 624, 676, 1014, 1352, 2028, 2704, 4056, 8112
6 odd divisors
1, 3, 13, 39, 169, 507
How to compute the divisors of 8112?
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 8112 by each of the numbers from 1 to 8112 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 8112 / 1 = 8112 (the remainder is 0, so 1 is a divisor of 8112)
- 8112 / 2 = 4056 (the remainder is 0, so 2 is a divisor of 8112)
- 8112 / 3 = 2704 (the remainder is 0, so 3 is a divisor of 8112)
- ...
- 8112 / 8111 = 1.0001232893601 (the remainder is 1, so 8111 is not a divisor of 8112)
- 8112 / 8112 = 1 (the remainder is 0, so 8112 is a divisor of 8112)
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 8112 (i.e. 90.066641993582). 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 )
- 8112 / 1 = 8112 (the remainder is 0, so 1 and 8112 are divisors of 8112)
- 8112 / 2 = 4056 (the remainder is 0, so 2 and 4056 are divisors of 8112)
- 8112 / 3 = 2704 (the remainder is 0, so 3 and 2704 are divisors of 8112)
- ...
- 8112 / 89 = 91.14606741573 (the remainder is 13, so 89 is not a divisor of 8112)
- 8112 / 90 = 90.133333333333 (the remainder is 12, so 90 is not a divisor of 8112)