What are the divisors of 772?
1, 2, 4, 193, 386, 772
- There is a total of 6 positive divisors.
- The sum of these divisors is 1358.
- The arithmetic mean is 226.33333333333.
4 even divisors
2, 4, 386, 772
2 odd divisors
1, 193
How to compute the divisors of 772?
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 772 by each of the numbers from 1 to 772 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 772 / 1 = 772 (the remainder is 0, so 1 is a divisor of 772)
- 772 / 2 = 386 (the remainder is 0, so 2 is a divisor of 772)
- 772 / 3 = 257.33333333333 (the remainder is 1, so 3 is not a divisor of 772)
- ...
- 772 / 771 = 1.0012970168612 (the remainder is 1, so 771 is not a divisor of 772)
- 772 / 772 = 1 (the remainder is 0, so 772 is a divisor of 772)
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 772 (i.e. 27.7848879789). 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 )
- 772 / 1 = 772 (the remainder is 0, so 1 and 772 are divisors of 772)
- 772 / 2 = 386 (the remainder is 0, so 2 and 386 are divisors of 772)
- 772 / 3 = 257.33333333333 (the remainder is 1, so 3 is not a divisor of 772)
- ...
- 772 / 26 = 29.692307692308 (the remainder is 18, so 26 is not a divisor of 772)
- 772 / 27 = 28.592592592593 (the remainder is 16, so 27 is not a divisor of 772)