What are the divisors of 835?
1, 5, 167, 835
- There is a total of 4 positive divisors.
- The sum of these divisors is 1008.
- The arithmetic mean is 252.
4 odd divisors
1, 5, 167, 835
How to compute the divisors of 835?
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 835 by each of the numbers from 1 to 835 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 835 / 1 = 835 (the remainder is 0, so 1 is a divisor of 835)
- 835 / 2 = 417.5 (the remainder is 1, so 2 is not a divisor of 835)
- 835 / 3 = 278.33333333333 (the remainder is 1, so 3 is not a divisor of 835)
- ...
- 835 / 834 = 1.0011990407674 (the remainder is 1, so 834 is not a divisor of 835)
- 835 / 835 = 1 (the remainder is 0, so 835 is a divisor of 835)
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 835 (i.e. 28.8963665536). 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 )
- 835 / 1 = 835 (the remainder is 0, so 1 and 835 are divisors of 835)
- 835 / 2 = 417.5 (the remainder is 1, so 2 is not a divisor of 835)
- 835 / 3 = 278.33333333333 (the remainder is 1, so 3 is not a divisor of 835)
- ...
- 835 / 27 = 30.925925925926 (the remainder is 25, so 27 is not a divisor of 835)
- 835 / 28 = 29.821428571429 (the remainder is 23, so 28 is not a divisor of 835)