What are the divisors of 781?
1, 11, 71, 781
- There is a total of 4 positive divisors.
- The sum of these divisors is 864.
- The arithmetic mean is 216.
4 odd divisors
1, 11, 71, 781
How to compute the divisors of 781?
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 781 by each of the numbers from 1 to 781 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 781 / 1 = 781 (the remainder is 0, so 1 is a divisor of 781)
- 781 / 2 = 390.5 (the remainder is 1, so 2 is not a divisor of 781)
- 781 / 3 = 260.33333333333 (the remainder is 1, so 3 is not a divisor of 781)
- ...
- 781 / 780 = 1.0012820512821 (the remainder is 1, so 780 is not a divisor of 781)
- 781 / 781 = 1 (the remainder is 0, so 781 is a divisor of 781)
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 781 (i.e. 27.946377224964). 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 )
- 781 / 1 = 781 (the remainder is 0, so 1 and 781 are divisors of 781)
- 781 / 2 = 390.5 (the remainder is 1, so 2 is not a divisor of 781)
- 781 / 3 = 260.33333333333 (the remainder is 1, so 3 is not a divisor of 781)
- ...
- 781 / 26 = 30.038461538462 (the remainder is 1, so 26 is not a divisor of 781)
- 781 / 27 = 28.925925925926 (the remainder is 25, so 27 is not a divisor of 781)