What are the divisors of 1179?
1, 3, 9, 131, 393, 1179
- There is a total of 6 positive divisors.
- The sum of these divisors is 1716.
- The arithmetic mean is 286.
6 odd divisors
1, 3, 9, 131, 393, 1179
How to compute the divisors of 1179?
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 1179 by each of the numbers from 1 to 1179 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1179 / 1 = 1179 (the remainder is 0, so 1 is a divisor of 1179)
- 1179 / 2 = 589.5 (the remainder is 1, so 2 is not a divisor of 1179)
- 1179 / 3 = 393 (the remainder is 0, so 3 is a divisor of 1179)
- ...
- 1179 / 1178 = 1.0008488964346 (the remainder is 1, so 1178 is not a divisor of 1179)
- 1179 / 1179 = 1 (the remainder is 0, so 1179 is a divisor of 1179)
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 1179 (i.e. 34.336569426779). 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 )
- 1179 / 1 = 1179 (the remainder is 0, so 1 and 1179 are divisors of 1179)
- 1179 / 2 = 589.5 (the remainder is 1, so 2 is not a divisor of 1179)
- 1179 / 3 = 393 (the remainder is 0, so 3 and 393 are divisors of 1179)
- ...
- 1179 / 33 = 35.727272727273 (the remainder is 24, so 33 is not a divisor of 1179)
- 1179 / 34 = 34.676470588235 (the remainder is 23, so 34 is not a divisor of 1179)