What are the divisors of 2646?
1, 2, 3, 6, 7, 9, 14, 18, 21, 27, 42, 49, 54, 63, 98, 126, 147, 189, 294, 378, 441, 882, 1323, 2646
- There is a total of 24 positive divisors.
- The sum of these divisors is 6840.
- The arithmetic mean is 285.
12 even divisors
2, 6, 14, 18, 42, 54, 98, 126, 294, 378, 882, 2646
12 odd divisors
1, 3, 7, 9, 21, 27, 49, 63, 147, 189, 441, 1323
How to compute the divisors of 2646?
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 2646 by each of the numbers from 1 to 2646 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2646 / 1 = 2646 (the remainder is 0, so 1 is a divisor of 2646)
- 2646 / 2 = 1323 (the remainder is 0, so 2 is a divisor of 2646)
- 2646 / 3 = 882 (the remainder is 0, so 3 is a divisor of 2646)
- ...
- 2646 / 2645 = 1.0003780718336 (the remainder is 1, so 2645 is not a divisor of 2646)
- 2646 / 2646 = 1 (the remainder is 0, so 2646 is a divisor of 2646)
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 2646 (i.e. 51.439284598447). 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 )
- 2646 / 1 = 2646 (the remainder is 0, so 1 and 2646 are divisors of 2646)
- 2646 / 2 = 1323 (the remainder is 0, so 2 and 1323 are divisors of 2646)
- 2646 / 3 = 882 (the remainder is 0, so 3 and 882 are divisors of 2646)
- ...
- 2646 / 50 = 52.92 (the remainder is 46, so 50 is not a divisor of 2646)
- 2646 / 51 = 51.882352941176 (the remainder is 45, so 51 is not a divisor of 2646)