What are the divisors of 868?
1, 2, 4, 7, 14, 28, 31, 62, 124, 217, 434, 868
- There is a total of 12 positive divisors.
- The sum of these divisors is 1792.
- The arithmetic mean is 149.33333333333.
8 even divisors
2, 4, 14, 28, 62, 124, 434, 868
4 odd divisors
1, 7, 31, 217
How to compute the divisors of 868?
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 868 by each of the numbers from 1 to 868 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 868 / 1 = 868 (the remainder is 0, so 1 is a divisor of 868)
- 868 / 2 = 434 (the remainder is 0, so 2 is a divisor of 868)
- 868 / 3 = 289.33333333333 (the remainder is 1, so 3 is not a divisor of 868)
- ...
- 868 / 867 = 1.0011534025375 (the remainder is 1, so 867 is not a divisor of 868)
- 868 / 868 = 1 (the remainder is 0, so 868 is a divisor of 868)
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 868 (i.e. 29.461839725312). 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 )
- 868 / 1 = 868 (the remainder is 0, so 1 and 868 are divisors of 868)
- 868 / 2 = 434 (the remainder is 0, so 2 and 434 are divisors of 868)
- 868 / 3 = 289.33333333333 (the remainder is 1, so 3 is not a divisor of 868)
- ...
- 868 / 28 = 31 (the remainder is 0, so 28 and 31 are divisors of 868)
- 868 / 29 = 29.931034482759 (the remainder is 27, so 29 is not a divisor of 868)