What are the divisors of 867?
1, 3, 17, 51, 289, 867
- There is a total of 6 positive divisors.
- The sum of these divisors is 1228.
- The arithmetic mean is 204.66666666667.
6 odd divisors
1, 3, 17, 51, 289, 867
How to compute the divisors of 867?
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 867 by each of the numbers from 1 to 867 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 867 / 1 = 867 (the remainder is 0, so 1 is a divisor of 867)
- 867 / 2 = 433.5 (the remainder is 1, so 2 is not a divisor of 867)
- 867 / 3 = 289 (the remainder is 0, so 3 is a divisor of 867)
- ...
- 867 / 866 = 1.0011547344111 (the remainder is 1, so 866 is not a divisor of 867)
- 867 / 867 = 1 (the remainder is 0, so 867 is a divisor of 867)
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 867 (i.e. 29.444863728671). 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 )
- 867 / 1 = 867 (the remainder is 0, so 1 and 867 are divisors of 867)
- 867 / 2 = 433.5 (the remainder is 1, so 2 is not a divisor of 867)
- 867 / 3 = 289 (the remainder is 0, so 3 and 289 are divisors of 867)
- ...
- 867 / 28 = 30.964285714286 (the remainder is 27, so 28 is not a divisor of 867)
- 867 / 29 = 29.896551724138 (the remainder is 26, so 29 is not a divisor of 867)