What are the divisors of 1979?
1, 1979
- There is a total of 2 positive divisors.
- The sum of these divisors is 1980.
- The arithmetic mean is 990.
2 odd divisors
1, 1979
How to compute the divisors of 1979?
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 1979 by each of the numbers from 1 to 1979 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1979 / 1 = 1979 (the remainder is 0, so 1 is a divisor of 1979)
- 1979 / 2 = 989.5 (the remainder is 1, so 2 is not a divisor of 1979)
- 1979 / 3 = 659.66666666667 (the remainder is 2, so 3 is not a divisor of 1979)
- ...
- 1979 / 1978 = 1.0005055611729 (the remainder is 1, so 1978 is not a divisor of 1979)
- 1979 / 1979 = 1 (the remainder is 0, so 1979 is a divisor of 1979)
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 1979 (i.e. 44.48595283907). 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 )
- 1979 / 1 = 1979 (the remainder is 0, so 1 and 1979 are divisors of 1979)
- 1979 / 2 = 989.5 (the remainder is 1, so 2 is not a divisor of 1979)
- 1979 / 3 = 659.66666666667 (the remainder is 2, so 3 is not a divisor of 1979)
- ...
- 1979 / 43 = 46.023255813953 (the remainder is 1, so 43 is not a divisor of 1979)
- 1979 / 44 = 44.977272727273 (the remainder is 43, so 44 is not a divisor of 1979)