What are the divisors of 17?
1, 17
- There is a total of 2 positive divisors.
- The sum of these divisors is 18.
- The arithmetic mean is 9.
2 odd divisors
1, 17
How to compute the divisors of 17?
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 17 by each of the numbers from 1 to 17 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 17 / 1 = 17 (the remainder is 0, so 1 is a divisor of 17)
- 17 / 2 = 8.5 (the remainder is 1, so 2 is not a divisor of 17)
- 17 / 3 = 5.6666666666667 (the remainder is 2, so 3 is not a divisor of 17)
- ...
- 17 / 4 = 4.25 (the remainder is 1, so 4 is not a divisor of 17)
- 17 / 5 = 3.4 (the remainder is 2, so 5 is not a divisor of 17)
- 17 / 6 = 2.8333333333333 (the remainder is 5, so 6 is not a divisor of 17)
- 17 / 7 = 2.4285714285714 (the remainder is 3, so 7 is not a divisor of 17)
- 17 / 8 = 2.125 (the remainder is 1, so 8 is not a divisor of 17)
- 17 / 9 = 1.8888888888889 (the remainder is 8, so 9 is not a divisor of 17)
- 17 / 10 = 1.7 (the remainder is 7, so 10 is not a divisor of 17)
- 17 / 11 = 1.5454545454545 (the remainder is 6, so 11 is not a divisor of 17)
- 17 / 12 = 1.4166666666667 (the remainder is 5, so 12 is not a divisor of 17)
- 17 / 13 = 1.3076923076923 (the remainder is 4, so 13 is not a divisor of 17)
- 17 / 14 = 1.2142857142857 (the remainder is 3, so 14 is not a divisor of 17)
- 17 / 15 = 1.1333333333333 (the remainder is 2, so 15 is not a divisor of 17)
- 17 / 16 = 1.0625 (the remainder is 1, so 16 is not a divisor of 17)
- 17 / 17 = 1 (the remainder is 0, so 17 is a divisor of 17)
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 17 (i.e. 4.1231056256177). 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 )
- 17 / 1 = 17 (the remainder is 0, so 1 and 17 are divisors of 17)
- 17 / 2 = 8.5 (the remainder is 1, so 2 is not a divisor of 17)
- 17 / 3 = 5.6666666666667 (the remainder is 2, so 3 is not a divisor of 17)
- ...
- 17 / 4 = 4.25 (the remainder is 1, so 4 is not a divisor of 17)