What are the divisors of 4092?
1, 2, 3, 4, 6, 11, 12, 22, 31, 33, 44, 62, 66, 93, 124, 132, 186, 341, 372, 682, 1023, 1364, 2046, 4092
- There is a total of 24 positive divisors.
- The sum of these divisors is 10752.
- The arithmetic mean is 448.
16 even divisors
2, 4, 6, 12, 22, 44, 62, 66, 124, 132, 186, 372, 682, 1364, 2046, 4092
8 odd divisors
1, 3, 11, 31, 33, 93, 341, 1023
How to compute the divisors of 4092?
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 4092 by each of the numbers from 1 to 4092 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4092 / 1 = 4092 (the remainder is 0, so 1 is a divisor of 4092)
- 4092 / 2 = 2046 (the remainder is 0, so 2 is a divisor of 4092)
- 4092 / 3 = 1364 (the remainder is 0, so 3 is a divisor of 4092)
- ...
- 4092 / 4091 = 1.0002444390125 (the remainder is 1, so 4091 is not a divisor of 4092)
- 4092 / 4092 = 1 (the remainder is 0, so 4092 is a divisor of 4092)
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 4092 (i.e. 63.968742366878). 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 )
- 4092 / 1 = 4092 (the remainder is 0, so 1 and 4092 are divisors of 4092)
- 4092 / 2 = 2046 (the remainder is 0, so 2 and 2046 are divisors of 4092)
- 4092 / 3 = 1364 (the remainder is 0, so 3 and 1364 are divisors of 4092)
- ...
- 4092 / 62 = 66 (the remainder is 0, so 62 and 66 are divisors of 4092)
- 4092 / 63 = 64.952380952381 (the remainder is 60, so 63 is not a divisor of 4092)