What are the divisors of 8007?
1, 3, 17, 51, 157, 471, 2669, 8007
- There is a total of 8 positive divisors.
- The sum of these divisors is 11376.
- The arithmetic mean is 1422.
8 odd divisors
1, 3, 17, 51, 157, 471, 2669, 8007
How to compute the divisors of 8007?
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 8007 by each of the numbers from 1 to 8007 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 8007 / 1 = 8007 (the remainder is 0, so 1 is a divisor of 8007)
- 8007 / 2 = 4003.5 (the remainder is 1, so 2 is not a divisor of 8007)
- 8007 / 3 = 2669 (the remainder is 0, so 3 is a divisor of 8007)
- ...
- 8007 / 8006 = 1.0001249063203 (the remainder is 1, so 8006 is not a divisor of 8007)
- 8007 / 8007 = 1 (the remainder is 0, so 8007 is a divisor of 8007)
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 8007 (i.e. 89.481841733393). 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 )
- 8007 / 1 = 8007 (the remainder is 0, so 1 and 8007 are divisors of 8007)
- 8007 / 2 = 4003.5 (the remainder is 1, so 2 is not a divisor of 8007)
- 8007 / 3 = 2669 (the remainder is 0, so 3 and 2669 are divisors of 8007)
- ...
- 8007 / 88 = 90.988636363636 (the remainder is 87, so 88 is not a divisor of 8007)
- 8007 / 89 = 89.966292134831 (the remainder is 86, so 89 is not a divisor of 8007)