What are the divisors of 872?
1, 2, 4, 8, 109, 218, 436, 872
- There is a total of 8 positive divisors.
- The sum of these divisors is 1650.
- The arithmetic mean is 206.25.
6 even divisors
2, 4, 8, 218, 436, 872
2 odd divisors
1, 109
How to compute the divisors of 872?
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 872 by each of the numbers from 1 to 872 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 872 / 1 = 872 (the remainder is 0, so 1 is a divisor of 872)
- 872 / 2 = 436 (the remainder is 0, so 2 is a divisor of 872)
- 872 / 3 = 290.66666666667 (the remainder is 2, so 3 is not a divisor of 872)
- ...
- 872 / 871 = 1.0011481056257 (the remainder is 1, so 871 is not a divisor of 872)
- 872 / 872 = 1 (the remainder is 0, so 872 is a divisor of 872)
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 872 (i.e. 29.529646120467). 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 )
- 872 / 1 = 872 (the remainder is 0, so 1 and 872 are divisors of 872)
- 872 / 2 = 436 (the remainder is 0, so 2 and 436 are divisors of 872)
- 872 / 3 = 290.66666666667 (the remainder is 2, so 3 is not a divisor of 872)
- ...
- 872 / 28 = 31.142857142857 (the remainder is 4, so 28 is not a divisor of 872)
- 872 / 29 = 30.068965517241 (the remainder is 2, so 29 is not a divisor of 872)