What are the divisors of 3886?
1, 2, 29, 58, 67, 134, 1943, 3886
- There is a total of 8 positive divisors.
- The sum of these divisors is 6120.
- The arithmetic mean is 765.
4 even divisors
2, 58, 134, 3886
4 odd divisors
1, 29, 67, 1943
How to compute the divisors of 3886?
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 3886 by each of the numbers from 1 to 3886 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3886 / 1 = 3886 (the remainder is 0, so 1 is a divisor of 3886)
- 3886 / 2 = 1943 (the remainder is 0, so 2 is a divisor of 3886)
- 3886 / 3 = 1295.3333333333 (the remainder is 1, so 3 is not a divisor of 3886)
- ...
- 3886 / 3885 = 1.0002574002574 (the remainder is 1, so 3885 is not a divisor of 3886)
- 3886 / 3886 = 1 (the remainder is 0, so 3886 is a divisor of 3886)
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 3886 (i.e. 62.337789502035). 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 )
- 3886 / 1 = 3886 (the remainder is 0, so 1 and 3886 are divisors of 3886)
- 3886 / 2 = 1943 (the remainder is 0, so 2 and 1943 are divisors of 3886)
- 3886 / 3 = 1295.3333333333 (the remainder is 1, so 3 is not a divisor of 3886)
- ...
- 3886 / 61 = 63.704918032787 (the remainder is 43, so 61 is not a divisor of 3886)
- 3886 / 62 = 62.677419354839 (the remainder is 42, so 62 is not a divisor of 3886)