What are the divisors of 2842?
1, 2, 7, 14, 29, 49, 58, 98, 203, 406, 1421, 2842
- There is a total of 12 positive divisors.
- The sum of these divisors is 5130.
- The arithmetic mean is 427.5.
6 even divisors
2, 14, 58, 98, 406, 2842
6 odd divisors
1, 7, 29, 49, 203, 1421
How to compute the divisors of 2842?
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 2842 by each of the numbers from 1 to 2842 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2842 / 1 = 2842 (the remainder is 0, so 1 is a divisor of 2842)
- 2842 / 2 = 1421 (the remainder is 0, so 2 is a divisor of 2842)
- 2842 / 3 = 947.33333333333 (the remainder is 1, so 3 is not a divisor of 2842)
- ...
- 2842 / 2841 = 1.0003519887364 (the remainder is 1, so 2841 is not a divisor of 2842)
- 2842 / 2842 = 1 (the remainder is 0, so 2842 is a divisor of 2842)
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 2842 (i.e. 53.310411741047). 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 )
- 2842 / 1 = 2842 (the remainder is 0, so 1 and 2842 are divisors of 2842)
- 2842 / 2 = 1421 (the remainder is 0, so 2 and 1421 are divisors of 2842)
- 2842 / 3 = 947.33333333333 (the remainder is 1, so 3 is not a divisor of 2842)
- ...
- 2842 / 52 = 54.653846153846 (the remainder is 34, so 52 is not a divisor of 2842)
- 2842 / 53 = 53.622641509434 (the remainder is 33, so 53 is not a divisor of 2842)