What are the divisors of 1195?
1, 5, 239, 1195
- There is a total of 4 positive divisors.
- The sum of these divisors is 1440.
- The arithmetic mean is 360.
4 odd divisors
1, 5, 239, 1195
How to compute the divisors of 1195?
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 1195 by each of the numbers from 1 to 1195 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1195 / 1 = 1195 (the remainder is 0, so 1 is a divisor of 1195)
- 1195 / 2 = 597.5 (the remainder is 1, so 2 is not a divisor of 1195)
- 1195 / 3 = 398.33333333333 (the remainder is 1, so 3 is not a divisor of 1195)
- ...
- 1195 / 1194 = 1.000837520938 (the remainder is 1, so 1194 is not a divisor of 1195)
- 1195 / 1195 = 1 (the remainder is 0, so 1195 is a divisor of 1195)
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 1195 (i.e. 34.568772034887). 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 )
- 1195 / 1 = 1195 (the remainder is 0, so 1 and 1195 are divisors of 1195)
- 1195 / 2 = 597.5 (the remainder is 1, so 2 is not a divisor of 1195)
- 1195 / 3 = 398.33333333333 (the remainder is 1, so 3 is not a divisor of 1195)
- ...
- 1195 / 33 = 36.212121212121 (the remainder is 7, so 33 is not a divisor of 1195)
- 1195 / 34 = 35.147058823529 (the remainder is 5, so 34 is not a divisor of 1195)