What are the divisors of 3854?
1, 2, 41, 47, 82, 94, 1927, 3854
- There is a total of 8 positive divisors.
- The sum of these divisors is 6048.
- The arithmetic mean is 756.
4 even divisors
2, 82, 94, 3854
4 odd divisors
1, 41, 47, 1927
How to compute the divisors of 3854?
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 3854 by each of the numbers from 1 to 3854 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3854 / 1 = 3854 (the remainder is 0, so 1 is a divisor of 3854)
- 3854 / 2 = 1927 (the remainder is 0, so 2 is a divisor of 3854)
- 3854 / 3 = 1284.6666666667 (the remainder is 2, so 3 is not a divisor of 3854)
- ...
- 3854 / 3853 = 1.0002595380223 (the remainder is 1, so 3853 is not a divisor of 3854)
- 3854 / 3854 = 1 (the remainder is 0, so 3854 is a divisor of 3854)
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 3854 (i.e. 62.080592780675). 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 )
- 3854 / 1 = 3854 (the remainder is 0, so 1 and 3854 are divisors of 3854)
- 3854 / 2 = 1927 (the remainder is 0, so 2 and 1927 are divisors of 3854)
- 3854 / 3 = 1284.6666666667 (the remainder is 2, so 3 is not a divisor of 3854)
- ...
- 3854 / 61 = 63.180327868852 (the remainder is 11, so 61 is not a divisor of 3854)
- 3854 / 62 = 62.161290322581 (the remainder is 10, so 62 is not a divisor of 3854)