What are the divisors of 3882?
1, 2, 3, 6, 647, 1294, 1941, 3882
- There is a total of 8 positive divisors.
- The sum of these divisors is 7776.
- The arithmetic mean is 972.
4 even divisors
2, 6, 1294, 3882
4 odd divisors
1, 3, 647, 1941
How to compute the divisors of 3882?
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 3882 by each of the numbers from 1 to 3882 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3882 / 1 = 3882 (the remainder is 0, so 1 is a divisor of 3882)
- 3882 / 2 = 1941 (the remainder is 0, so 2 is a divisor of 3882)
- 3882 / 3 = 1294 (the remainder is 0, so 3 is a divisor of 3882)
- ...
- 3882 / 3881 = 1.0002576655501 (the remainder is 1, so 3881 is not a divisor of 3882)
- 3882 / 3882 = 1 (the remainder is 0, so 3882 is a divisor of 3882)
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 3882 (i.e. 62.305697973781). 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 )
- 3882 / 1 = 3882 (the remainder is 0, so 1 and 3882 are divisors of 3882)
- 3882 / 2 = 1941 (the remainder is 0, so 2 and 1941 are divisors of 3882)
- 3882 / 3 = 1294 (the remainder is 0, so 3 and 1294 are divisors of 3882)
- ...
- 3882 / 61 = 63.639344262295 (the remainder is 39, so 61 is not a divisor of 3882)
- 3882 / 62 = 62.612903225806 (the remainder is 38, so 62 is not a divisor of 3882)