What are the divisors of 843?
1, 3, 281, 843
- There is a total of 4 positive divisors.
- The sum of these divisors is 1128.
- The arithmetic mean is 282.
4 odd divisors
1, 3, 281, 843
How to compute the divisors of 843?
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 843 by each of the numbers from 1 to 843 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 843 / 1 = 843 (the remainder is 0, so 1 is a divisor of 843)
- 843 / 2 = 421.5 (the remainder is 1, so 2 is not a divisor of 843)
- 843 / 3 = 281 (the remainder is 0, so 3 is a divisor of 843)
- ...
- 843 / 842 = 1.0011876484561 (the remainder is 1, so 842 is not a divisor of 843)
- 843 / 843 = 1 (the remainder is 0, so 843 is a divisor of 843)
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 843 (i.e. 29.034462281916). 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 )
- 843 / 1 = 843 (the remainder is 0, so 1 and 843 are divisors of 843)
- 843 / 2 = 421.5 (the remainder is 1, so 2 is not a divisor of 843)
- 843 / 3 = 281 (the remainder is 0, so 3 and 281 are divisors of 843)
- ...
- 843 / 28 = 30.107142857143 (the remainder is 3, so 28 is not a divisor of 843)
- 843 / 29 = 29.068965517241 (the remainder is 2, so 29 is not a divisor of 843)