What are the divisors of 2146?
1, 2, 29, 37, 58, 74, 1073, 2146
- There is a total of 8 positive divisors.
- The sum of these divisors is 3420.
- The arithmetic mean is 427.5.
4 even divisors
2, 58, 74, 2146
4 odd divisors
1, 29, 37, 1073
How to compute the divisors of 2146?
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 2146 by each of the numbers from 1 to 2146 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2146 / 1 = 2146 (the remainder is 0, so 1 is a divisor of 2146)
- 2146 / 2 = 1073 (the remainder is 0, so 2 is a divisor of 2146)
- 2146 / 3 = 715.33333333333 (the remainder is 1, so 3 is not a divisor of 2146)
- ...
- 2146 / 2145 = 1.0004662004662 (the remainder is 1, so 2145 is not a divisor of 2146)
- 2146 / 2146 = 1 (the remainder is 0, so 2146 is a divisor of 2146)
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 2146 (i.e. 46.324939287602). 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 )
- 2146 / 1 = 2146 (the remainder is 0, so 1 and 2146 are divisors of 2146)
- 2146 / 2 = 1073 (the remainder is 0, so 2 and 1073 are divisors of 2146)
- 2146 / 3 = 715.33333333333 (the remainder is 1, so 3 is not a divisor of 2146)
- ...
- 2146 / 45 = 47.688888888889 (the remainder is 31, so 45 is not a divisor of 2146)
- 2146 / 46 = 46.652173913043 (the remainder is 30, so 46 is not a divisor of 2146)