What are the divisors of 1185?
1, 3, 5, 15, 79, 237, 395, 1185
- There is a total of 8 positive divisors.
- The sum of these divisors is 1920.
- The arithmetic mean is 240.
8 odd divisors
1, 3, 5, 15, 79, 237, 395, 1185
How to compute the divisors of 1185?
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 1185 by each of the numbers from 1 to 1185 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1185 / 1 = 1185 (the remainder is 0, so 1 is a divisor of 1185)
- 1185 / 2 = 592.5 (the remainder is 1, so 2 is not a divisor of 1185)
- 1185 / 3 = 395 (the remainder is 0, so 3 is a divisor of 1185)
- ...
- 1185 / 1184 = 1.0008445945946 (the remainder is 1, so 1184 is not a divisor of 1185)
- 1185 / 1185 = 1 (the remainder is 0, so 1185 is a divisor of 1185)
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 1185 (i.e. 34.423828956117). 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 )
- 1185 / 1 = 1185 (the remainder is 0, so 1 and 1185 are divisors of 1185)
- 1185 / 2 = 592.5 (the remainder is 1, so 2 is not a divisor of 1185)
- 1185 / 3 = 395 (the remainder is 0, so 3 and 395 are divisors of 1185)
- ...
- 1185 / 33 = 35.909090909091 (the remainder is 30, so 33 is not a divisor of 1185)
- 1185 / 34 = 34.852941176471 (the remainder is 29, so 34 is not a divisor of 1185)