What are the divisors of 3861?
1, 3, 9, 11, 13, 27, 33, 39, 99, 117, 143, 297, 351, 429, 1287, 3861
- There is a total of 16 positive divisors.
- The sum of these divisors is 6720.
- The arithmetic mean is 420.
16 odd divisors
1, 3, 9, 11, 13, 27, 33, 39, 99, 117, 143, 297, 351, 429, 1287, 3861
How to compute the divisors of 3861?
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 3861 by each of the numbers from 1 to 3861 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3861 / 1 = 3861 (the remainder is 0, so 1 is a divisor of 3861)
- 3861 / 2 = 1930.5 (the remainder is 1, so 2 is not a divisor of 3861)
- 3861 / 3 = 1287 (the remainder is 0, so 3 is a divisor of 3861)
- ...
- 3861 / 3860 = 1.0002590673575 (the remainder is 1, so 3860 is not a divisor of 3861)
- 3861 / 3861 = 1 (the remainder is 0, so 3861 is a divisor of 3861)
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 3861 (i.e. 62.136945531624). 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 )
- 3861 / 1 = 3861 (the remainder is 0, so 1 and 3861 are divisors of 3861)
- 3861 / 2 = 1930.5 (the remainder is 1, so 2 is not a divisor of 3861)
- 3861 / 3 = 1287 (the remainder is 0, so 3 and 1287 are divisors of 3861)
- ...
- 3861 / 61 = 63.295081967213 (the remainder is 18, so 61 is not a divisor of 3861)
- 3861 / 62 = 62.274193548387 (the remainder is 17, so 62 is not a divisor of 3861)