What are the divisors of 3185?
1, 5, 7, 13, 35, 49, 65, 91, 245, 455, 637, 3185
- There is a total of 12 positive divisors.
- The sum of these divisors is 4788.
- The arithmetic mean is 399.
12 odd divisors
1, 5, 7, 13, 35, 49, 65, 91, 245, 455, 637, 3185
How to compute the divisors of 3185?
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 3185 by each of the numbers from 1 to 3185 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3185 / 1 = 3185 (the remainder is 0, so 1 is a divisor of 3185)
- 3185 / 2 = 1592.5 (the remainder is 1, so 2 is not a divisor of 3185)
- 3185 / 3 = 1061.6666666667 (the remainder is 2, so 3 is not a divisor of 3185)
- ...
- 3185 / 3184 = 1.0003140703518 (the remainder is 1, so 3184 is not a divisor of 3185)
- 3185 / 3185 = 1 (the remainder is 0, so 3185 is a divisor of 3185)
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 3185 (i.e. 56.43580423809). 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 )
- 3185 / 1 = 3185 (the remainder is 0, so 1 and 3185 are divisors of 3185)
- 3185 / 2 = 1592.5 (the remainder is 1, so 2 is not a divisor of 3185)
- 3185 / 3 = 1061.6666666667 (the remainder is 2, so 3 is not a divisor of 3185)
- ...
- 3185 / 55 = 57.909090909091 (the remainder is 50, so 55 is not a divisor of 3185)
- 3185 / 56 = 56.875 (the remainder is 49, so 56 is not a divisor of 3185)