What are the divisors of 2664?
1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 37, 72, 74, 111, 148, 222, 296, 333, 444, 666, 888, 1332, 2664
- There is a total of 24 positive divisors.
- The sum of these divisors is 7410.
- The arithmetic mean is 308.75.
18 even divisors
2, 4, 6, 8, 12, 18, 24, 36, 72, 74, 148, 222, 296, 444, 666, 888, 1332, 2664
6 odd divisors
1, 3, 9, 37, 111, 333
How to compute the divisors of 2664?
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 2664 by each of the numbers from 1 to 2664 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2664 / 1 = 2664 (the remainder is 0, so 1 is a divisor of 2664)
- 2664 / 2 = 1332 (the remainder is 0, so 2 is a divisor of 2664)
- 2664 / 3 = 888 (the remainder is 0, so 3 is a divisor of 2664)
- ...
- 2664 / 2663 = 1.000375516335 (the remainder is 1, so 2663 is not a divisor of 2664)
- 2664 / 2664 = 1 (the remainder is 0, so 2664 is a divisor of 2664)
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 2664 (i.e. 51.613951602256). 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 )
- 2664 / 1 = 2664 (the remainder is 0, so 1 and 2664 are divisors of 2664)
- 2664 / 2 = 1332 (the remainder is 0, so 2 and 1332 are divisors of 2664)
- 2664 / 3 = 888 (the remainder is 0, so 3 and 888 are divisors of 2664)
- ...
- 2664 / 50 = 53.28 (the remainder is 14, so 50 is not a divisor of 2664)
- 2664 / 51 = 52.235294117647 (the remainder is 12, so 51 is not a divisor of 2664)