What are the divisors of 2571?
1, 3, 857, 2571
- There is a total of 4 positive divisors.
- The sum of these divisors is 3432.
- The arithmetic mean is 858.
4 odd divisors
1, 3, 857, 2571
How to compute the divisors of 2571?
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 2571 by each of the numbers from 1 to 2571 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2571 / 1 = 2571 (the remainder is 0, so 1 is a divisor of 2571)
- 2571 / 2 = 1285.5 (the remainder is 1, so 2 is not a divisor of 2571)
- 2571 / 3 = 857 (the remainder is 0, so 3 is a divisor of 2571)
- ...
- 2571 / 2570 = 1.0003891050584 (the remainder is 1, so 2570 is not a divisor of 2571)
- 2571 / 2571 = 1 (the remainder is 0, so 2571 is a divisor of 2571)
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 2571 (i.e. 50.705029336349). 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 )
- 2571 / 1 = 2571 (the remainder is 0, so 1 and 2571 are divisors of 2571)
- 2571 / 2 = 1285.5 (the remainder is 1, so 2 is not a divisor of 2571)
- 2571 / 3 = 857 (the remainder is 0, so 3 and 857 are divisors of 2571)
- ...
- 2571 / 49 = 52.469387755102 (the remainder is 23, so 49 is not a divisor of 2571)
- 2571 / 50 = 51.42 (the remainder is 21, so 50 is not a divisor of 2571)