What are the divisors of 837?
1, 3, 9, 27, 31, 93, 279, 837
- There is a total of 8 positive divisors.
- The sum of these divisors is 1280.
- The arithmetic mean is 160.
8 odd divisors
1, 3, 9, 27, 31, 93, 279, 837
How to compute the divisors of 837?
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 837 by each of the numbers from 1 to 837 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 837 / 1 = 837 (the remainder is 0, so 1 is a divisor of 837)
- 837 / 2 = 418.5 (the remainder is 1, so 2 is not a divisor of 837)
- 837 / 3 = 279 (the remainder is 0, so 3 is a divisor of 837)
- ...
- 837 / 836 = 1.0011961722488 (the remainder is 1, so 836 is not a divisor of 837)
- 837 / 837 = 1 (the remainder is 0, so 837 is a divisor of 837)
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 837 (i.e. 28.930952282979). 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 )
- 837 / 1 = 837 (the remainder is 0, so 1 and 837 are divisors of 837)
- 837 / 2 = 418.5 (the remainder is 1, so 2 is not a divisor of 837)
- 837 / 3 = 279 (the remainder is 0, so 3 and 279 are divisors of 837)
- ...
- 837 / 27 = 31 (the remainder is 0, so 27 and 31 are divisors of 837)
- 837 / 28 = 29.892857142857 (the remainder is 25, so 28 is not a divisor of 837)