What are the divisors of 3992?
1, 2, 4, 8, 499, 998, 1996, 3992
- There is a total of 8 positive divisors.
- The sum of these divisors is 7500.
- The arithmetic mean is 937.5.
6 even divisors
2, 4, 8, 998, 1996, 3992
2 odd divisors
1, 499
How to compute the divisors of 3992?
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 3992 by each of the numbers from 1 to 3992 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3992 / 1 = 3992 (the remainder is 0, so 1 is a divisor of 3992)
- 3992 / 2 = 1996 (the remainder is 0, so 2 is a divisor of 3992)
- 3992 / 3 = 1330.6666666667 (the remainder is 2, so 3 is not a divisor of 3992)
- ...
- 3992 / 3991 = 1.0002505637685 (the remainder is 1, so 3991 is not a divisor of 3992)
- 3992 / 3992 = 1 (the remainder is 0, so 3992 is a divisor of 3992)
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 3992 (i.e. 63.182275995725). 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 )
- 3992 / 1 = 3992 (the remainder is 0, so 1 and 3992 are divisors of 3992)
- 3992 / 2 = 1996 (the remainder is 0, so 2 and 1996 are divisors of 3992)
- 3992 / 3 = 1330.6666666667 (the remainder is 2, so 3 is not a divisor of 3992)
- ...
- 3992 / 62 = 64.387096774194 (the remainder is 24, so 62 is not a divisor of 3992)
- 3992 / 63 = 63.365079365079 (the remainder is 23, so 63 is not a divisor of 3992)