What are the divisors of 2994?
1, 2, 3, 6, 499, 998, 1497, 2994
- There is a total of 8 positive divisors.
- The sum of these divisors is 6000.
- The arithmetic mean is 750.
4 even divisors
2, 6, 998, 2994
4 odd divisors
1, 3, 499, 1497
How to compute the divisors of 2994?
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 2994 by each of the numbers from 1 to 2994 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2994 / 1 = 2994 (the remainder is 0, so 1 is a divisor of 2994)
- 2994 / 2 = 1497 (the remainder is 0, so 2 is a divisor of 2994)
- 2994 / 3 = 998 (the remainder is 0, so 3 is a divisor of 2994)
- ...
- 2994 / 2993 = 1.0003341129302 (the remainder is 1, so 2993 is not a divisor of 2994)
- 2994 / 2994 = 1 (the remainder is 0, so 2994 is a divisor of 2994)
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 2994 (i.e. 54.717456081218). 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 )
- 2994 / 1 = 2994 (the remainder is 0, so 1 and 2994 are divisors of 2994)
- 2994 / 2 = 1497 (the remainder is 0, so 2 and 1497 are divisors of 2994)
- 2994 / 3 = 998 (the remainder is 0, so 3 and 998 are divisors of 2994)
- ...
- 2994 / 53 = 56.490566037736 (the remainder is 26, so 53 is not a divisor of 2994)
- 2994 / 54 = 55.444444444444 (the remainder is 24, so 54 is not a divisor of 2994)