What are the divisors of 72?
1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72
- There is a total of 12 positive divisors.
- The sum of these divisors is 195.
- The arithmetic mean is 16.25.
9 even divisors
2, 4, 6, 8, 12, 18, 24, 36, 72
3 odd divisors
1, 3, 9
How to compute the divisors of 72?
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 72 by each of the numbers from 1 to 72 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 72 / 1 = 72 (the remainder is 0, so 1 is a divisor of 72)
- 72 / 2 = 36 (the remainder is 0, so 2 is a divisor of 72)
- 72 / 3 = 24 (the remainder is 0, so 3 is a divisor of 72)
- ...
- 72 / 71 = 1.0140845070423 (the remainder is 1, so 71 is not a divisor of 72)
- 72 / 72 = 1 (the remainder is 0, so 72 is a divisor of 72)
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 72 (i.e. 8.4852813742386). 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 )
- 72 / 1 = 72 (the remainder is 0, so 1 and 72 are divisors of 72)
- 72 / 2 = 36 (the remainder is 0, so 2 and 36 are divisors of 72)
- 72 / 3 = 24 (the remainder is 0, so 3 and 24 are divisors of 72)
- ...
- 72 / 7 = 10.285714285714 (the remainder is 2, so 7 is not a divisor of 72)
- 72 / 8 = 9 (the remainder is 0, so 8 and 9 are divisors of 72)