What are the divisors of 1942?
1, 2, 971, 1942
- There is a total of 4 positive divisors.
- The sum of these divisors is 2916.
- The arithmetic mean is 729.
2 even divisors
2, 1942
2 odd divisors
1, 971
How to compute the divisors of 1942?
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 1942 by each of the numbers from 1 to 1942 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1942 / 1 = 1942 (the remainder is 0, so 1 is a divisor of 1942)
- 1942 / 2 = 971 (the remainder is 0, so 2 is a divisor of 1942)
- 1942 / 3 = 647.33333333333 (the remainder is 1, so 3 is not a divisor of 1942)
- ...
- 1942 / 1941 = 1.0005151983514 (the remainder is 1, so 1941 is not a divisor of 1942)
- 1942 / 1942 = 1 (the remainder is 0, so 1942 is a divisor of 1942)
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 1942 (i.e. 44.068129073061). 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 )
- 1942 / 1 = 1942 (the remainder is 0, so 1 and 1942 are divisors of 1942)
- 1942 / 2 = 971 (the remainder is 0, so 2 and 971 are divisors of 1942)
- 1942 / 3 = 647.33333333333 (the remainder is 1, so 3 is not a divisor of 1942)
- ...
- 1942 / 43 = 45.162790697674 (the remainder is 7, so 43 is not a divisor of 1942)
- 1942 / 44 = 44.136363636364 (the remainder is 6, so 44 is not a divisor of 1942)