What are the divisors of 2188?
1, 2, 4, 547, 1094, 2188
- There is a total of 6 positive divisors.
- The sum of these divisors is 3836.
- The arithmetic mean is 639.33333333333.
4 even divisors
2, 4, 1094, 2188
2 odd divisors
1, 547
How to compute the divisors of 2188?
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 2188 by each of the numbers from 1 to 2188 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2188 / 1 = 2188 (the remainder is 0, so 1 is a divisor of 2188)
- 2188 / 2 = 1094 (the remainder is 0, so 2 is a divisor of 2188)
- 2188 / 3 = 729.33333333333 (the remainder is 1, so 3 is not a divisor of 2188)
- ...
- 2188 / 2187 = 1.0004572473708 (the remainder is 1, so 2187 is not a divisor of 2188)
- 2188 / 2188 = 1 (the remainder is 0, so 2188 is a divisor of 2188)
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 2188 (i.e. 46.776062254106). 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 )
- 2188 / 1 = 2188 (the remainder is 0, so 1 and 2188 are divisors of 2188)
- 2188 / 2 = 1094 (the remainder is 0, so 2 and 1094 are divisors of 2188)
- 2188 / 3 = 729.33333333333 (the remainder is 1, so 3 is not a divisor of 2188)
- ...
- 2188 / 45 = 48.622222222222 (the remainder is 28, so 45 is not a divisor of 2188)
- 2188 / 46 = 47.565217391304 (the remainder is 26, so 46 is not a divisor of 2188)