What are the divisors of 783?
1, 3, 9, 27, 29, 87, 261, 783
- There is a total of 8 positive divisors.
- The sum of these divisors is 1200.
- The arithmetic mean is 150.
8 odd divisors
1, 3, 9, 27, 29, 87, 261, 783
How to compute the divisors of 783?
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 783 by each of the numbers from 1 to 783 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 783 / 1 = 783 (the remainder is 0, so 1 is a divisor of 783)
- 783 / 2 = 391.5 (the remainder is 1, so 2 is not a divisor of 783)
- 783 / 3 = 261 (the remainder is 0, so 3 is a divisor of 783)
- ...
- 783 / 782 = 1.0012787723785 (the remainder is 1, so 782 is not a divisor of 783)
- 783 / 783 = 1 (the remainder is 0, so 783 is a divisor of 783)
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 783 (i.e. 27.982137159266). 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 )
- 783 / 1 = 783 (the remainder is 0, so 1 and 783 are divisors of 783)
- 783 / 2 = 391.5 (the remainder is 1, so 2 is not a divisor of 783)
- 783 / 3 = 261 (the remainder is 0, so 3 and 261 are divisors of 783)
- ...
- 783 / 26 = 30.115384615385 (the remainder is 3, so 26 is not a divisor of 783)
- 783 / 27 = 29 (the remainder is 0, so 27 and 29 are divisors of 783)