What are the divisors of 3870?
1, 2, 3, 5, 6, 9, 10, 15, 18, 30, 43, 45, 86, 90, 129, 215, 258, 387, 430, 645, 774, 1290, 1935, 3870
- There is a total of 24 positive divisors.
- The sum of these divisors is 10296.
- The arithmetic mean is 429.
12 even divisors
2, 6, 10, 18, 30, 86, 90, 258, 430, 774, 1290, 3870
12 odd divisors
1, 3, 5, 9, 15, 43, 45, 129, 215, 387, 645, 1935
How to compute the divisors of 3870?
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 3870 by each of the numbers from 1 to 3870 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3870 / 1 = 3870 (the remainder is 0, so 1 is a divisor of 3870)
- 3870 / 2 = 1935 (the remainder is 0, so 2 is a divisor of 3870)
- 3870 / 3 = 1290 (the remainder is 0, so 3 is a divisor of 3870)
- ...
- 3870 / 3869 = 1.0002584647196 (the remainder is 1, so 3869 is not a divisor of 3870)
- 3870 / 3870 = 1 (the remainder is 0, so 3870 is a divisor of 3870)
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 3870 (i.e. 62.209324059983). 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 )
- 3870 / 1 = 3870 (the remainder is 0, so 1 and 3870 are divisors of 3870)
- 3870 / 2 = 1935 (the remainder is 0, so 2 and 1935 are divisors of 3870)
- 3870 / 3 = 1290 (the remainder is 0, so 3 and 1290 are divisors of 3870)
- ...
- 3870 / 61 = 63.44262295082 (the remainder is 27, so 61 is not a divisor of 3870)
- 3870 / 62 = 62.41935483871 (the remainder is 26, so 62 is not a divisor of 3870)