What are the divisors of 76?
1, 2, 4, 19, 38, 76
- There is a total of 6 positive divisors.
- The sum of these divisors is 140.
- The arithmetic mean is 23.333333333333.
4 even divisors
2, 4, 38, 76
2 odd divisors
1, 19
How to compute the divisors of 76?
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 76 by each of the numbers from 1 to 76 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 76 / 1 = 76 (the remainder is 0, so 1 is a divisor of 76)
- 76 / 2 = 38 (the remainder is 0, so 2 is a divisor of 76)
- 76 / 3 = 25.333333333333 (the remainder is 1, so 3 is not a divisor of 76)
- ...
- 76 / 75 = 1.0133333333333 (the remainder is 1, so 75 is not a divisor of 76)
- 76 / 76 = 1 (the remainder is 0, so 76 is a divisor of 76)
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 76 (i.e. 8.7177978870813). 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 )
- 76 / 1 = 76 (the remainder is 0, so 1 and 76 are divisors of 76)
- 76 / 2 = 38 (the remainder is 0, so 2 and 38 are divisors of 76)
- 76 / 3 = 25.333333333333 (the remainder is 1, so 3 is not a divisor of 76)
- ...
- 76 / 7 = 10.857142857143 (the remainder is 6, so 7 is not a divisor of 76)
- 76 / 8 = 9.5 (the remainder is 4, so 8 is not a divisor of 76)