What are the divisors of 3012?
1, 2, 3, 4, 6, 12, 251, 502, 753, 1004, 1506, 3012
- There is a total of 12 positive divisors.
- The sum of these divisors is 7056.
- The arithmetic mean is 588.
8 even divisors
2, 4, 6, 12, 502, 1004, 1506, 3012
4 odd divisors
1, 3, 251, 753
How to compute the divisors of 3012?
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 3012 by each of the numbers from 1 to 3012 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3012 / 1 = 3012 (the remainder is 0, so 1 is a divisor of 3012)
- 3012 / 2 = 1506 (the remainder is 0, so 2 is a divisor of 3012)
- 3012 / 3 = 1004 (the remainder is 0, so 3 is a divisor of 3012)
- ...
- 3012 / 3011 = 1.0003321155762 (the remainder is 1, so 3011 is not a divisor of 3012)
- 3012 / 3012 = 1 (the remainder is 0, so 3012 is a divisor of 3012)
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 3012 (i.e. 54.881690936049). 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 )
- 3012 / 1 = 3012 (the remainder is 0, so 1 and 3012 are divisors of 3012)
- 3012 / 2 = 1506 (the remainder is 0, so 2 and 1506 are divisors of 3012)
- 3012 / 3 = 1004 (the remainder is 0, so 3 and 1004 are divisors of 3012)
- ...
- 3012 / 53 = 56.830188679245 (the remainder is 44, so 53 is not a divisor of 3012)
- 3012 / 54 = 55.777777777778 (the remainder is 42, so 54 is not a divisor of 3012)