What are the divisors of 8000?
1, 2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 160, 200, 250, 320, 400, 500, 800, 1000, 1600, 2000, 4000, 8000
- There is a total of 28 positive divisors.
- The sum of these divisors is 19812.
- The arithmetic mean is 707.57142857143.
24 even divisors
2, 4, 8, 10, 16, 20, 32, 40, 50, 64, 80, 100, 160, 200, 250, 320, 400, 500, 800, 1000, 1600, 2000, 4000, 8000
4 odd divisors
1, 5, 25, 125
How to compute the divisors of 8000?
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 8000 by each of the numbers from 1 to 8000 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 8000 / 1 = 8000 (the remainder is 0, so 1 is a divisor of 8000)
- 8000 / 2 = 4000 (the remainder is 0, so 2 is a divisor of 8000)
- 8000 / 3 = 2666.6666666667 (the remainder is 2, so 3 is not a divisor of 8000)
- ...
- 8000 / 7999 = 1.000125015627 (the remainder is 1, so 7999 is not a divisor of 8000)
- 8000 / 8000 = 1 (the remainder is 0, so 8000 is a divisor of 8000)
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 8000 (i.e. 89.442719099992). 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 )
- 8000 / 1 = 8000 (the remainder is 0, so 1 and 8000 are divisors of 8000)
- 8000 / 2 = 4000 (the remainder is 0, so 2 and 4000 are divisors of 8000)
- 8000 / 3 = 2666.6666666667 (the remainder is 2, so 3 is not a divisor of 8000)
- ...
- 8000 / 88 = 90.909090909091 (the remainder is 80, so 88 is not a divisor of 8000)
- 8000 / 89 = 89.887640449438 (the remainder is 79, so 89 is not a divisor of 8000)