What are the divisors of 8124?
1, 2, 3, 4, 6, 12, 677, 1354, 2031, 2708, 4062, 8124
- There is a total of 12 positive divisors.
- The sum of these divisors is 18984.
- The arithmetic mean is 1582.
8 even divisors
2, 4, 6, 12, 1354, 2708, 4062, 8124
4 odd divisors
1, 3, 677, 2031
How to compute the divisors of 8124?
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 8124 by each of the numbers from 1 to 8124 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 8124 / 1 = 8124 (the remainder is 0, so 1 is a divisor of 8124)
- 8124 / 2 = 4062 (the remainder is 0, so 2 is a divisor of 8124)
- 8124 / 3 = 2708 (the remainder is 0, so 3 is a divisor of 8124)
- ...
- 8124 / 8123 = 1.0001231072264 (the remainder is 1, so 8123 is not a divisor of 8124)
- 8124 / 8124 = 1 (the remainder is 0, so 8124 is a divisor of 8124)
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 8124 (i.e. 90.13323471395). 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 )
- 8124 / 1 = 8124 (the remainder is 0, so 1 and 8124 are divisors of 8124)
- 8124 / 2 = 4062 (the remainder is 0, so 2 and 4062 are divisors of 8124)
- 8124 / 3 = 2708 (the remainder is 0, so 3 and 2708 are divisors of 8124)
- ...
- 8124 / 89 = 91.280898876404 (the remainder is 25, so 89 is not a divisor of 8124)
- 8124 / 90 = 90.266666666667 (the remainder is 24, so 90 is not a divisor of 8124)