What are the divisors of 2794?
1, 2, 11, 22, 127, 254, 1397, 2794
- There is a total of 8 positive divisors.
- The sum of these divisors is 4608.
- The arithmetic mean is 576.
4 even divisors
2, 22, 254, 2794
4 odd divisors
1, 11, 127, 1397
How to compute the divisors of 2794?
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 2794 by each of the numbers from 1 to 2794 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2794 / 1 = 2794 (the remainder is 0, so 1 is a divisor of 2794)
- 2794 / 2 = 1397 (the remainder is 0, so 2 is a divisor of 2794)
- 2794 / 3 = 931.33333333333 (the remainder is 1, so 3 is not a divisor of 2794)
- ...
- 2794 / 2793 = 1.000358037952 (the remainder is 1, so 2793 is not a divisor of 2794)
- 2794 / 2794 = 1 (the remainder is 0, so 2794 is a divisor of 2794)
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 2794 (i.e. 52.85830114561). 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 )
- 2794 / 1 = 2794 (the remainder is 0, so 1 and 2794 are divisors of 2794)
- 2794 / 2 = 1397 (the remainder is 0, so 2 and 1397 are divisors of 2794)
- 2794 / 3 = 931.33333333333 (the remainder is 1, so 3 is not a divisor of 2794)
- ...
- 2794 / 51 = 54.78431372549 (the remainder is 40, so 51 is not a divisor of 2794)
- 2794 / 52 = 53.730769230769 (the remainder is 38, so 52 is not a divisor of 2794)