What are the divisors of 873?
1, 3, 9, 97, 291, 873
- There is a total of 6 positive divisors.
- The sum of these divisors is 1274.
- The arithmetic mean is 212.33333333333.
6 odd divisors
1, 3, 9, 97, 291, 873
How to compute the divisors of 873?
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 873 by each of the numbers from 1 to 873 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 873 / 1 = 873 (the remainder is 0, so 1 is a divisor of 873)
- 873 / 2 = 436.5 (the remainder is 1, so 2 is not a divisor of 873)
- 873 / 3 = 291 (the remainder is 0, so 3 is a divisor of 873)
- ...
- 873 / 872 = 1.0011467889908 (the remainder is 1, so 872 is not a divisor of 873)
- 873 / 873 = 1 (the remainder is 0, so 873 is a divisor of 873)
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 873 (i.e. 29.546573405388). 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 )
- 873 / 1 = 873 (the remainder is 0, so 1 and 873 are divisors of 873)
- 873 / 2 = 436.5 (the remainder is 1, so 2 is not a divisor of 873)
- 873 / 3 = 291 (the remainder is 0, so 3 and 291 are divisors of 873)
- ...
- 873 / 28 = 31.178571428571 (the remainder is 5, so 28 is not a divisor of 873)
- 873 / 29 = 30.103448275862 (the remainder is 3, so 29 is not a divisor of 873)