What are the divisors of 1970?
1, 2, 5, 10, 197, 394, 985, 1970
- There is a total of 8 positive divisors.
- The sum of these divisors is 3564.
- The arithmetic mean is 445.5.
4 even divisors
2, 10, 394, 1970
4 odd divisors
1, 5, 197, 985
How to compute the divisors of 1970?
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 1970 by each of the numbers from 1 to 1970 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1970 / 1 = 1970 (the remainder is 0, so 1 is a divisor of 1970)
- 1970 / 2 = 985 (the remainder is 0, so 2 is a divisor of 1970)
- 1970 / 3 = 656.66666666667 (the remainder is 2, so 3 is not a divisor of 1970)
- ...
- 1970 / 1969 = 1.0005078720163 (the remainder is 1, so 1969 is not a divisor of 1970)
- 1970 / 1970 = 1 (the remainder is 0, so 1970 is a divisor of 1970)
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 1970 (i.e. 44.384682042344). 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 )
- 1970 / 1 = 1970 (the remainder is 0, so 1 and 1970 are divisors of 1970)
- 1970 / 2 = 985 (the remainder is 0, so 2 and 985 are divisors of 1970)
- 1970 / 3 = 656.66666666667 (the remainder is 2, so 3 is not a divisor of 1970)
- ...
- 1970 / 43 = 45.813953488372 (the remainder is 35, so 43 is not a divisor of 1970)
- 1970 / 44 = 44.772727272727 (the remainder is 34, so 44 is not a divisor of 1970)