What are the divisors of 2957?
1, 2957
- There is a total of 2 positive divisors.
- The sum of these divisors is 2958.
- The arithmetic mean is 1479.
2 odd divisors
1, 2957
How to compute the divisors of 2957?
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 2957 by each of the numbers from 1 to 2957 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2957 / 1 = 2957 (the remainder is 0, so 1 is a divisor of 2957)
- 2957 / 2 = 1478.5 (the remainder is 1, so 2 is not a divisor of 2957)
- 2957 / 3 = 985.66666666667 (the remainder is 2, so 3 is not a divisor of 2957)
- ...
- 2957 / 2956 = 1.0003382949932 (the remainder is 1, so 2956 is not a divisor of 2957)
- 2957 / 2957 = 1 (the remainder is 0, so 2957 is a divisor of 2957)
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 2957 (i.e. 54.37830449729). 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 )
- 2957 / 1 = 2957 (the remainder is 0, so 1 and 2957 are divisors of 2957)
- 2957 / 2 = 1478.5 (the remainder is 1, so 2 is not a divisor of 2957)
- 2957 / 3 = 985.66666666667 (the remainder is 2, so 3 is not a divisor of 2957)
- ...
- 2957 / 53 = 55.792452830189 (the remainder is 42, so 53 is not a divisor of 2957)
- 2957 / 54 = 54.759259259259 (the remainder is 41, so 54 is not a divisor of 2957)