What are the divisors of 70?
1, 2, 5, 7, 10, 14, 35, 70
- There is a total of 8 positive divisors.
- The sum of these divisors is 144.
- The arithmetic mean is 18.
4 even divisors
2, 10, 14, 70
4 odd divisors
1, 5, 7, 35
How to compute the divisors of 70?
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 70 by each of the numbers from 1 to 70 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 70 / 1 = 70 (the remainder is 0, so 1 is a divisor of 70)
- 70 / 2 = 35 (the remainder is 0, so 2 is a divisor of 70)
- 70 / 3 = 23.333333333333 (the remainder is 1, so 3 is not a divisor of 70)
- ...
- 70 / 69 = 1.0144927536232 (the remainder is 1, so 69 is not a divisor of 70)
- 70 / 70 = 1 (the remainder is 0, so 70 is a divisor of 70)
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 70 (i.e. 8.3666002653408). 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 )
- 70 / 1 = 70 (the remainder is 0, so 1 and 70 are divisors of 70)
- 70 / 2 = 35 (the remainder is 0, so 2 and 35 are divisors of 70)
- 70 / 3 = 23.333333333333 (the remainder is 1, so 3 is not a divisor of 70)
- ...
- 70 / 7 = 10 (the remainder is 0, so 7 and 10 are divisors of 70)
- 70 / 8 = 8.75 (the remainder is 6, so 8 is not a divisor of 70)