What are the divisors of 7021?
1, 7, 17, 59, 119, 413, 1003, 7021
- There is a total of 8 positive divisors.
- The sum of these divisors is 8640.
- The arithmetic mean is 1080.
8 odd divisors
1, 7, 17, 59, 119, 413, 1003, 7021
How to compute the divisors of 7021?
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 7021 by each of the numbers from 1 to 7021 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 7021 / 1 = 7021 (the remainder is 0, so 1 is a divisor of 7021)
- 7021 / 2 = 3510.5 (the remainder is 1, so 2 is not a divisor of 7021)
- 7021 / 3 = 2340.3333333333 (the remainder is 1, so 3 is not a divisor of 7021)
- ...
- 7021 / 7020 = 1.0001424501425 (the remainder is 1, so 7020 is not a divisor of 7021)
- 7021 / 7021 = 1 (the remainder is 0, so 7021 is a divisor of 7021)
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 7021 (i.e. 83.791407674057). 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 )
- 7021 / 1 = 7021 (the remainder is 0, so 1 and 7021 are divisors of 7021)
- 7021 / 2 = 3510.5 (the remainder is 1, so 2 is not a divisor of 7021)
- 7021 / 3 = 2340.3333333333 (the remainder is 1, so 3 is not a divisor of 7021)
- ...
- 7021 / 82 = 85.621951219512 (the remainder is 51, so 82 is not a divisor of 7021)
- 7021 / 83 = 84.590361445783 (the remainder is 49, so 83 is not a divisor of 7021)