What are the divisors of 2988?
1, 2, 3, 4, 6, 9, 12, 18, 36, 83, 166, 249, 332, 498, 747, 996, 1494, 2988
- There is a total of 18 positive divisors.
- The sum of these divisors is 7644.
- The arithmetic mean is 424.66666666667.
12 even divisors
2, 4, 6, 12, 18, 36, 166, 332, 498, 996, 1494, 2988
6 odd divisors
1, 3, 9, 83, 249, 747
How to compute the divisors of 2988?
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 2988 by each of the numbers from 1 to 2988 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2988 / 1 = 2988 (the remainder is 0, so 1 is a divisor of 2988)
- 2988 / 2 = 1494 (the remainder is 0, so 2 is a divisor of 2988)
- 2988 / 3 = 996 (the remainder is 0, so 3 is a divisor of 2988)
- ...
- 2988 / 2987 = 1.0003347840643 (the remainder is 1, so 2987 is not a divisor of 2988)
- 2988 / 2988 = 1 (the remainder is 0, so 2988 is a divisor of 2988)
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 2988 (i.e. 54.662601474866). 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 )
- 2988 / 1 = 2988 (the remainder is 0, so 1 and 2988 are divisors of 2988)
- 2988 / 2 = 1494 (the remainder is 0, so 2 and 1494 are divisors of 2988)
- 2988 / 3 = 996 (the remainder is 0, so 3 and 996 are divisors of 2988)
- ...
- 2988 / 53 = 56.377358490566 (the remainder is 20, so 53 is not a divisor of 2988)
- 2988 / 54 = 55.333333333333 (the remainder is 18, so 54 is not a divisor of 2988)