What are the divisors of 7006?
1, 2, 31, 62, 113, 226, 3503, 7006
- There is a total of 8 positive divisors.
- The sum of these divisors is 10944.
- The arithmetic mean is 1368.
4 even divisors
2, 62, 226, 7006
4 odd divisors
1, 31, 113, 3503
How to compute the divisors of 7006?
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 7006 by each of the numbers from 1 to 7006 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 7006 / 1 = 7006 (the remainder is 0, so 1 is a divisor of 7006)
- 7006 / 2 = 3503 (the remainder is 0, so 2 is a divisor of 7006)
- 7006 / 3 = 2335.3333333333 (the remainder is 1, so 3 is not a divisor of 7006)
- ...
- 7006 / 7005 = 1.0001427551749 (the remainder is 1, so 7005 is not a divisor of 7006)
- 7006 / 7006 = 1 (the remainder is 0, so 7006 is a divisor of 7006)
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 7006 (i.e. 83.701851831366). 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 )
- 7006 / 1 = 7006 (the remainder is 0, so 1 and 7006 are divisors of 7006)
- 7006 / 2 = 3503 (the remainder is 0, so 2 and 3503 are divisors of 7006)
- 7006 / 3 = 2335.3333333333 (the remainder is 1, so 3 is not a divisor of 7006)
- ...
- 7006 / 82 = 85.439024390244 (the remainder is 36, so 82 is not a divisor of 7006)
- 7006 / 83 = 84.409638554217 (the remainder is 34, so 83 is not a divisor of 7006)