What are the divisors of 805?
1, 5, 7, 23, 35, 115, 161, 805
- There is a total of 8 positive divisors.
- The sum of these divisors is 1152.
- The arithmetic mean is 144.
8 odd divisors
1, 5, 7, 23, 35, 115, 161, 805
How to compute the divisors of 805?
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 805 by each of the numbers from 1 to 805 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 805 / 1 = 805 (the remainder is 0, so 1 is a divisor of 805)
- 805 / 2 = 402.5 (the remainder is 1, so 2 is not a divisor of 805)
- 805 / 3 = 268.33333333333 (the remainder is 1, so 3 is not a divisor of 805)
- ...
- 805 / 804 = 1.0012437810945 (the remainder is 1, so 804 is not a divisor of 805)
- 805 / 805 = 1 (the remainder is 0, so 805 is a divisor of 805)
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 805 (i.e. 28.372521918222). 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 )
- 805 / 1 = 805 (the remainder is 0, so 1 and 805 are divisors of 805)
- 805 / 2 = 402.5 (the remainder is 1, so 2 is not a divisor of 805)
- 805 / 3 = 268.33333333333 (the remainder is 1, so 3 is not a divisor of 805)
- ...
- 805 / 27 = 29.814814814815 (the remainder is 22, so 27 is not a divisor of 805)
- 805 / 28 = 28.75 (the remainder is 21, so 28 is not a divisor of 805)