What are the divisors of 68?
1, 2, 4, 17, 34, 68
- There is a total of 6 positive divisors.
- The sum of these divisors is 126.
- The arithmetic mean is 21.
4 even divisors
2, 4, 34, 68
2 odd divisors
1, 17
How to compute the divisors of 68?
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 68 by each of the numbers from 1 to 68 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 68 / 1 = 68 (the remainder is 0, so 1 is a divisor of 68)
- 68 / 2 = 34 (the remainder is 0, so 2 is a divisor of 68)
- 68 / 3 = 22.666666666667 (the remainder is 2, so 3 is not a divisor of 68)
- ...
- 68 / 67 = 1.0149253731343 (the remainder is 1, so 67 is not a divisor of 68)
- 68 / 68 = 1 (the remainder is 0, so 68 is a divisor of 68)
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 68 (i.e. 8.2462112512353). 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 )
- 68 / 1 = 68 (the remainder is 0, so 1 and 68 are divisors of 68)
- 68 / 2 = 34 (the remainder is 0, so 2 and 34 are divisors of 68)
- 68 / 3 = 22.666666666667 (the remainder is 2, so 3 is not a divisor of 68)
- ...
- 68 / 7 = 9.7142857142857 (the remainder is 5, so 7 is not a divisor of 68)
- 68 / 8 = 8.5 (the remainder is 4, so 8 is not a divisor of 68)