What are the divisors of 6018?
1, 2, 3, 6, 17, 34, 51, 59, 102, 118, 177, 354, 1003, 2006, 3009, 6018
- There is a total of 16 positive divisors.
- The sum of these divisors is 12960.
- The arithmetic mean is 810.
8 even divisors
2, 6, 34, 102, 118, 354, 2006, 6018
8 odd divisors
1, 3, 17, 51, 59, 177, 1003, 3009
How to compute the divisors of 6018?
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 6018 by each of the numbers from 1 to 6018 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 6018 / 1 = 6018 (the remainder is 0, so 1 is a divisor of 6018)
- 6018 / 2 = 3009 (the remainder is 0, so 2 is a divisor of 6018)
- 6018 / 3 = 2006 (the remainder is 0, so 3 is a divisor of 6018)
- ...
- 6018 / 6017 = 1.0001661957786 (the remainder is 1, so 6017 is not a divisor of 6018)
- 6018 / 6018 = 1 (the remainder is 0, so 6018 is a divisor of 6018)
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 6018 (i.e. 77.575769412878). 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 )
- 6018 / 1 = 6018 (the remainder is 0, so 1 and 6018 are divisors of 6018)
- 6018 / 2 = 3009 (the remainder is 0, so 2 and 3009 are divisors of 6018)
- 6018 / 3 = 2006 (the remainder is 0, so 3 and 2006 are divisors of 6018)
- ...
- 6018 / 76 = 79.184210526316 (the remainder is 14, so 76 is not a divisor of 6018)
- 6018 / 77 = 78.155844155844 (the remainder is 12, so 77 is not a divisor of 6018)