What are the divisors of 3982?
1, 2, 11, 22, 181, 362, 1991, 3982
- There is a total of 8 positive divisors.
- The sum of these divisors is 6552.
- The arithmetic mean is 819.
4 even divisors
2, 22, 362, 3982
4 odd divisors
1, 11, 181, 1991
How to compute the divisors of 3982?
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 3982 by each of the numbers from 1 to 3982 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3982 / 1 = 3982 (the remainder is 0, so 1 is a divisor of 3982)
- 3982 / 2 = 1991 (the remainder is 0, so 2 is a divisor of 3982)
- 3982 / 3 = 1327.3333333333 (the remainder is 1, so 3 is not a divisor of 3982)
- ...
- 3982 / 3981 = 1.0002511931675 (the remainder is 1, so 3981 is not a divisor of 3982)
- 3982 / 3982 = 1 (the remainder is 0, so 3982 is a divisor of 3982)
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 3982 (i.e. 63.103090257134). 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 )
- 3982 / 1 = 3982 (the remainder is 0, so 1 and 3982 are divisors of 3982)
- 3982 / 2 = 1991 (the remainder is 0, so 2 and 1991 are divisors of 3982)
- 3982 / 3 = 1327.3333333333 (the remainder is 1, so 3 is not a divisor of 3982)
- ...
- 3982 / 62 = 64.225806451613 (the remainder is 14, so 62 is not a divisor of 3982)
- 3982 / 63 = 63.206349206349 (the remainder is 13, so 63 is not a divisor of 3982)