What are the divisors of 9040?
1, 2, 4, 5, 8, 10, 16, 20, 40, 80, 113, 226, 452, 565, 904, 1130, 1808, 2260, 4520, 9040
- There is a total of 20 positive divisors.
- The sum of these divisors is 21204.
- The arithmetic mean is 1060.2.
16 even divisors
2, 4, 8, 10, 16, 20, 40, 80, 226, 452, 904, 1130, 1808, 2260, 4520, 9040
4 odd divisors
1, 5, 113, 565
How to compute the divisors of 9040?
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 9040 by each of the numbers from 1 to 9040 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 9040 / 1 = 9040 (the remainder is 0, so 1 is a divisor of 9040)
- 9040 / 2 = 4520 (the remainder is 0, so 2 is a divisor of 9040)
- 9040 / 3 = 3013.3333333333 (the remainder is 1, so 3 is not a divisor of 9040)
- ...
- 9040 / 9039 = 1.000110631707 (the remainder is 1, so 9039 is not a divisor of 9040)
- 9040 / 9040 = 1 (the remainder is 0, so 9040 is a divisor of 9040)
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 9040 (i.e. 95.078914592038). 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 )
- 9040 / 1 = 9040 (the remainder is 0, so 1 and 9040 are divisors of 9040)
- 9040 / 2 = 4520 (the remainder is 0, so 2 and 4520 are divisors of 9040)
- 9040 / 3 = 3013.3333333333 (the remainder is 1, so 3 is not a divisor of 9040)
- ...
- 9040 / 94 = 96.170212765957 (the remainder is 16, so 94 is not a divisor of 9040)
- 9040 / 95 = 95.157894736842 (the remainder is 15, so 95 is not a divisor of 9040)