What are the divisors of 2278?
1, 2, 17, 34, 67, 134, 1139, 2278
- There is a total of 8 positive divisors.
- The sum of these divisors is 3672.
- The arithmetic mean is 459.
4 even divisors
2, 34, 134, 2278
4 odd divisors
1, 17, 67, 1139
How to compute the divisors of 2278?
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 2278 by each of the numbers from 1 to 2278 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2278 / 1 = 2278 (the remainder is 0, so 1 is a divisor of 2278)
- 2278 / 2 = 1139 (the remainder is 0, so 2 is a divisor of 2278)
- 2278 / 3 = 759.33333333333 (the remainder is 1, so 3 is not a divisor of 2278)
- ...
- 2278 / 2277 = 1.0004391743522 (the remainder is 1, so 2277 is not a divisor of 2278)
- 2278 / 2278 = 1 (the remainder is 0, so 2278 is a divisor of 2278)
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 2278 (i.e. 47.728398255127). 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 )
- 2278 / 1 = 2278 (the remainder is 0, so 1 and 2278 are divisors of 2278)
- 2278 / 2 = 1139 (the remainder is 0, so 2 and 1139 are divisors of 2278)
- 2278 / 3 = 759.33333333333 (the remainder is 1, so 3 is not a divisor of 2278)
- ...
- 2278 / 46 = 49.521739130435 (the remainder is 24, so 46 is not a divisor of 2278)
- 2278 / 47 = 48.468085106383 (the remainder is 22, so 47 is not a divisor of 2278)