What are the divisors of 6012?
1, 2, 3, 4, 6, 9, 12, 18, 36, 167, 334, 501, 668, 1002, 1503, 2004, 3006, 6012
- There is a total of 18 positive divisors.
- The sum of these divisors is 15288.
- The arithmetic mean is 849.33333333333.
12 even divisors
2, 4, 6, 12, 18, 36, 334, 668, 1002, 2004, 3006, 6012
6 odd divisors
1, 3, 9, 167, 501, 1503
How to compute the divisors of 6012?
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 6012 by each of the numbers from 1 to 6012 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 6012 / 1 = 6012 (the remainder is 0, so 1 is a divisor of 6012)
- 6012 / 2 = 3006 (the remainder is 0, so 2 is a divisor of 6012)
- 6012 / 3 = 2004 (the remainder is 0, so 3 is a divisor of 6012)
- ...
- 6012 / 6011 = 1.0001663616703 (the remainder is 1, so 6011 is not a divisor of 6012)
- 6012 / 6012 = 1 (the remainder is 0, so 6012 is a divisor of 6012)
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 6012 (i.e. 77.537087899921). 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 )
- 6012 / 1 = 6012 (the remainder is 0, so 1 and 6012 are divisors of 6012)
- 6012 / 2 = 3006 (the remainder is 0, so 2 and 3006 are divisors of 6012)
- 6012 / 3 = 2004 (the remainder is 0, so 3 and 2004 are divisors of 6012)
- ...
- 6012 / 76 = 79.105263157895 (the remainder is 8, so 76 is not a divisor of 6012)
- 6012 / 77 = 78.077922077922 (the remainder is 6, so 77 is not a divisor of 6012)