What are the divisors of 3874?
1, 2, 13, 26, 149, 298, 1937, 3874
- There is a total of 8 positive divisors.
- The sum of these divisors is 6300.
- The arithmetic mean is 787.5.
4 even divisors
2, 26, 298, 3874
4 odd divisors
1, 13, 149, 1937
How to compute the divisors of 3874?
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 3874 by each of the numbers from 1 to 3874 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3874 / 1 = 3874 (the remainder is 0, so 1 is a divisor of 3874)
- 3874 / 2 = 1937 (the remainder is 0, so 2 is a divisor of 3874)
- 3874 / 3 = 1291.3333333333 (the remainder is 1, so 3 is not a divisor of 3874)
- ...
- 3874 / 3873 = 1.0002581977795 (the remainder is 1, so 3873 is not a divisor of 3874)
- 3874 / 3874 = 1 (the remainder is 0, so 3874 is a divisor of 3874)
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 3874 (i.e. 62.241465278382). 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 )
- 3874 / 1 = 3874 (the remainder is 0, so 1 and 3874 are divisors of 3874)
- 3874 / 2 = 1937 (the remainder is 0, so 2 and 1937 are divisors of 3874)
- 3874 / 3 = 1291.3333333333 (the remainder is 1, so 3 is not a divisor of 3874)
- ...
- 3874 / 61 = 63.508196721311 (the remainder is 31, so 61 is not a divisor of 3874)
- 3874 / 62 = 62.483870967742 (the remainder is 30, so 62 is not a divisor of 3874)