What are the divisors of 1107?
1, 3, 9, 27, 41, 123, 369, 1107
- There is a total of 8 positive divisors.
- The sum of these divisors is 1680.
- The arithmetic mean is 210.
8 odd divisors
1, 3, 9, 27, 41, 123, 369, 1107
How to compute the divisors of 1107?
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 1107 by each of the numbers from 1 to 1107 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1107 / 1 = 1107 (the remainder is 0, so 1 is a divisor of 1107)
- 1107 / 2 = 553.5 (the remainder is 1, so 2 is not a divisor of 1107)
- 1107 / 3 = 369 (the remainder is 0, so 3 is a divisor of 1107)
- ...
- 1107 / 1106 = 1.000904159132 (the remainder is 1, so 1106 is not a divisor of 1107)
- 1107 / 1107 = 1 (the remainder is 0, so 1107 is a divisor of 1107)
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 1107 (i.e. 33.271609519228). 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 )
- 1107 / 1 = 1107 (the remainder is 0, so 1 and 1107 are divisors of 1107)
- 1107 / 2 = 553.5 (the remainder is 1, so 2 is not a divisor of 1107)
- 1107 / 3 = 369 (the remainder is 0, so 3 and 369 are divisors of 1107)
- ...
- 1107 / 32 = 34.59375 (the remainder is 19, so 32 is not a divisor of 1107)
- 1107 / 33 = 33.545454545455 (the remainder is 18, so 33 is not a divisor of 1107)