What are the divisors of 2662?
1, 2, 11, 22, 121, 242, 1331, 2662
- There is a total of 8 positive divisors.
- The sum of these divisors is 4392.
- The arithmetic mean is 549.
4 even divisors
2, 22, 242, 2662
4 odd divisors
1, 11, 121, 1331
How to compute the divisors of 2662?
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 2662 by each of the numbers from 1 to 2662 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2662 / 1 = 2662 (the remainder is 0, so 1 is a divisor of 2662)
- 2662 / 2 = 1331 (the remainder is 0, so 2 is a divisor of 2662)
- 2662 / 3 = 887.33333333333 (the remainder is 1, so 3 is not a divisor of 2662)
- ...
- 2662 / 2661 = 1.000375798572 (the remainder is 1, so 2661 is not a divisor of 2662)
- 2662 / 2662 = 1 (the remainder is 0, so 2662 is a divisor of 2662)
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 2662 (i.e. 51.594573358058). 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 )
- 2662 / 1 = 2662 (the remainder is 0, so 1 and 2662 are divisors of 2662)
- 2662 / 2 = 1331 (the remainder is 0, so 2 and 1331 are divisors of 2662)
- 2662 / 3 = 887.33333333333 (the remainder is 1, so 3 is not a divisor of 2662)
- ...
- 2662 / 50 = 53.24 (the remainder is 12, so 50 is not a divisor of 2662)
- 2662 / 51 = 52.196078431373 (the remainder is 10, so 51 is not a divisor of 2662)