What are the divisors of 3009?
1, 3, 17, 51, 59, 177, 1003, 3009
- There is a total of 8 positive divisors.
- The sum of these divisors is 4320.
- The arithmetic mean is 540.
8 odd divisors
1, 3, 17, 51, 59, 177, 1003, 3009
How to compute the divisors of 3009?
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 3009 by each of the numbers from 1 to 3009 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3009 / 1 = 3009 (the remainder is 0, so 1 is a divisor of 3009)
- 3009 / 2 = 1504.5 (the remainder is 1, so 2 is not a divisor of 3009)
- 3009 / 3 = 1003 (the remainder is 0, so 3 is a divisor of 3009)
- ...
- 3009 / 3008 = 1.0003324468085 (the remainder is 1, so 3008 is not a divisor of 3009)
- 3009 / 3009 = 1 (the remainder is 0, so 3009 is a divisor of 3009)
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 3009 (i.e. 54.85435260761). 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 )
- 3009 / 1 = 3009 (the remainder is 0, so 1 and 3009 are divisors of 3009)
- 3009 / 2 = 1504.5 (the remainder is 1, so 2 is not a divisor of 3009)
- 3009 / 3 = 1003 (the remainder is 0, so 3 and 1003 are divisors of 3009)
- ...
- 3009 / 53 = 56.77358490566 (the remainder is 41, so 53 is not a divisor of 3009)
- 3009 / 54 = 55.722222222222 (the remainder is 39, so 54 is not a divisor of 3009)