What are the divisors of 3006?
1, 2, 3, 6, 9, 18, 167, 334, 501, 1002, 1503, 3006
- There is a total of 12 positive divisors.
- The sum of these divisors is 6552.
- The arithmetic mean is 546.
6 even divisors
2, 6, 18, 334, 1002, 3006
6 odd divisors
1, 3, 9, 167, 501, 1503
How to compute the divisors of 3006?
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 3006 by each of the numbers from 1 to 3006 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3006 / 1 = 3006 (the remainder is 0, so 1 is a divisor of 3006)
- 3006 / 2 = 1503 (the remainder is 0, so 2 is a divisor of 3006)
- 3006 / 3 = 1002 (the remainder is 0, so 3 is a divisor of 3006)
- ...
- 3006 / 3005 = 1.0003327787022 (the remainder is 1, so 3005 is not a divisor of 3006)
- 3006 / 3006 = 1 (the remainder is 0, so 3006 is a divisor of 3006)
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 3006 (i.e. 54.827000647491). 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 )
- 3006 / 1 = 3006 (the remainder is 0, so 1 and 3006 are divisors of 3006)
- 3006 / 2 = 1503 (the remainder is 0, so 2 and 1503 are divisors of 3006)
- 3006 / 3 = 1002 (the remainder is 0, so 3 and 1002 are divisors of 3006)
- ...
- 3006 / 53 = 56.716981132075 (the remainder is 38, so 53 is not a divisor of 3006)
- 3006 / 54 = 55.666666666667 (the remainder is 36, so 54 is not a divisor of 3006)