What are the divisors of 7017?
1, 3, 2339, 7017
- There is a total of 4 positive divisors.
- The sum of these divisors is 9360.
- The arithmetic mean is 2340.
4 odd divisors
1, 3, 2339, 7017
How to compute the divisors of 7017?
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 7017 by each of the numbers from 1 to 7017 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 7017 / 1 = 7017 (the remainder is 0, so 1 is a divisor of 7017)
- 7017 / 2 = 3508.5 (the remainder is 1, so 2 is not a divisor of 7017)
- 7017 / 3 = 2339 (the remainder is 0, so 3 is a divisor of 7017)
- ...
- 7017 / 7016 = 1.0001425313569 (the remainder is 1, so 7016 is not a divisor of 7017)
- 7017 / 7017 = 1 (the remainder is 0, so 7017 is a divisor of 7017)
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 7017 (i.e. 83.767535477654). 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 )
- 7017 / 1 = 7017 (the remainder is 0, so 1 and 7017 are divisors of 7017)
- 7017 / 2 = 3508.5 (the remainder is 1, so 2 is not a divisor of 7017)
- 7017 / 3 = 2339 (the remainder is 0, so 3 and 2339 are divisors of 7017)
- ...
- 7017 / 82 = 85.573170731707 (the remainder is 47, so 82 is not a divisor of 7017)
- 7017 / 83 = 84.542168674699 (the remainder is 45, so 83 is not a divisor of 7017)