What are the divisors of 7001?
1, 7001
- There is a total of 2 positive divisors.
- The sum of these divisors is 7002.
- The arithmetic mean is 3501.
2 odd divisors
1, 7001
How to compute the divisors of 7001?
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 7001 by each of the numbers from 1 to 7001 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 7001 / 1 = 7001 (the remainder is 0, so 1 is a divisor of 7001)
- 7001 / 2 = 3500.5 (the remainder is 1, so 2 is not a divisor of 7001)
- 7001 / 3 = 2333.6666666667 (the remainder is 2, so 3 is not a divisor of 7001)
- ...
- 7001 / 7000 = 1.0001428571429 (the remainder is 1, so 7000 is not a divisor of 7001)
- 7001 / 7001 = 1 (the remainder is 0, so 7001 is a divisor of 7001)
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 7001 (i.e. 83.671978583036). 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 )
- 7001 / 1 = 7001 (the remainder is 0, so 1 and 7001 are divisors of 7001)
- 7001 / 2 = 3500.5 (the remainder is 1, so 2 is not a divisor of 7001)
- 7001 / 3 = 2333.6666666667 (the remainder is 2, so 3 is not a divisor of 7001)
- ...
- 7001 / 82 = 85.378048780488 (the remainder is 31, so 82 is not a divisor of 7001)
- 7001 / 83 = 84.349397590361 (the remainder is 29, so 83 is not a divisor of 7001)