What are the divisors of 3786?
1, 2, 3, 6, 631, 1262, 1893, 3786
- There is a total of 8 positive divisors.
- The sum of these divisors is 7584.
- The arithmetic mean is 948.
4 even divisors
2, 6, 1262, 3786
4 odd divisors
1, 3, 631, 1893
How to compute the divisors of 3786?
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 3786 by each of the numbers from 1 to 3786 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3786 / 1 = 3786 (the remainder is 0, so 1 is a divisor of 3786)
- 3786 / 2 = 1893 (the remainder is 0, so 2 is a divisor of 3786)
- 3786 / 3 = 1262 (the remainder is 0, so 3 is a divisor of 3786)
- ...
- 3786 / 3785 = 1.0002642007926 (the remainder is 1, so 3785 is not a divisor of 3786)
- 3786 / 3786 = 1 (the remainder is 0, so 3786 is a divisor of 3786)
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 3786 (i.e. 61.530480251661). 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 )
- 3786 / 1 = 3786 (the remainder is 0, so 1 and 3786 are divisors of 3786)
- 3786 / 2 = 1893 (the remainder is 0, so 2 and 1893 are divisors of 3786)
- 3786 / 3 = 1262 (the remainder is 0, so 3 and 1262 are divisors of 3786)
- ...
- 3786 / 60 = 63.1 (the remainder is 6, so 60 is not a divisor of 3786)
- 3786 / 61 = 62.065573770492 (the remainder is 4, so 61 is not a divisor of 3786)