What are the divisors of 9012?
1, 2, 3, 4, 6, 12, 751, 1502, 2253, 3004, 4506, 9012
- There is a total of 12 positive divisors.
- The sum of these divisors is 21056.
- The arithmetic mean is 1754.6666666667.
8 even divisors
2, 4, 6, 12, 1502, 3004, 4506, 9012
4 odd divisors
1, 3, 751, 2253
How to compute the divisors of 9012?
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 9012 by each of the numbers from 1 to 9012 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 9012 / 1 = 9012 (the remainder is 0, so 1 is a divisor of 9012)
- 9012 / 2 = 4506 (the remainder is 0, so 2 is a divisor of 9012)
- 9012 / 3 = 3004 (the remainder is 0, so 3 is a divisor of 9012)
- ...
- 9012 / 9011 = 1.0001109754744 (the remainder is 1, so 9011 is not a divisor of 9012)
- 9012 / 9012 = 1 (the remainder is 0, so 9012 is a divisor of 9012)
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 9012 (i.e. 94.931554290447). 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 )
- 9012 / 1 = 9012 (the remainder is 0, so 1 and 9012 are divisors of 9012)
- 9012 / 2 = 4506 (the remainder is 0, so 2 and 4506 are divisors of 9012)
- 9012 / 3 = 3004 (the remainder is 0, so 3 and 3004 are divisors of 9012)
- ...
- 9012 / 93 = 96.903225806452 (the remainder is 84, so 93 is not a divisor of 9012)
- 9012 / 94 = 95.872340425532 (the remainder is 82, so 94 is not a divisor of 9012)