What are the divisors of 9045?
1, 3, 5, 9, 15, 27, 45, 67, 135, 201, 335, 603, 1005, 1809, 3015, 9045
- There is a total of 16 positive divisors.
- The sum of these divisors is 16320.
- The arithmetic mean is 1020.
16 odd divisors
1, 3, 5, 9, 15, 27, 45, 67, 135, 201, 335, 603, 1005, 1809, 3015, 9045
How to compute the divisors of 9045?
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 9045 by each of the numbers from 1 to 9045 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 9045 / 1 = 9045 (the remainder is 0, so 1 is a divisor of 9045)
- 9045 / 2 = 4522.5 (the remainder is 1, so 2 is not a divisor of 9045)
- 9045 / 3 = 3015 (the remainder is 0, so 3 is a divisor of 9045)
- ...
- 9045 / 9044 = 1.000110570544 (the remainder is 1, so 9044 is not a divisor of 9045)
- 9045 / 9045 = 1 (the remainder is 0, so 9045 is a divisor of 9045)
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 9045 (i.e. 95.105204904884). 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 )
- 9045 / 1 = 9045 (the remainder is 0, so 1 and 9045 are divisors of 9045)
- 9045 / 2 = 4522.5 (the remainder is 1, so 2 is not a divisor of 9045)
- 9045 / 3 = 3015 (the remainder is 0, so 3 and 3015 are divisors of 9045)
- ...
- 9045 / 94 = 96.223404255319 (the remainder is 21, so 94 is not a divisor of 9045)
- 9045 / 95 = 95.210526315789 (the remainder is 20, so 95 is not a divisor of 9045)