What are the divisors of 3990?
1, 2, 3, 5, 6, 7, 10, 14, 15, 19, 21, 30, 35, 38, 42, 57, 70, 95, 105, 114, 133, 190, 210, 266, 285, 399, 570, 665, 798, 1330, 1995, 3990
- There is a total of 32 positive divisors.
- The sum of these divisors is 11520.
- The arithmetic mean is 360.
16 even divisors
2, 6, 10, 14, 30, 38, 42, 70, 114, 190, 210, 266, 570, 798, 1330, 3990
16 odd divisors
1, 3, 5, 7, 15, 19, 21, 35, 57, 95, 105, 133, 285, 399, 665, 1995
How to compute the divisors of 3990?
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 3990 by each of the numbers from 1 to 3990 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3990 / 1 = 3990 (the remainder is 0, so 1 is a divisor of 3990)
- 3990 / 2 = 1995 (the remainder is 0, so 2 is a divisor of 3990)
- 3990 / 3 = 1330 (the remainder is 0, so 3 is a divisor of 3990)
- ...
- 3990 / 3989 = 1.0002506893958 (the remainder is 1, so 3989 is not a divisor of 3990)
- 3990 / 3990 = 1 (the remainder is 0, so 3990 is a divisor of 3990)
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 3990 (i.e. 63.166446789415). 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 )
- 3990 / 1 = 3990 (the remainder is 0, so 1 and 3990 are divisors of 3990)
- 3990 / 2 = 1995 (the remainder is 0, so 2 and 1995 are divisors of 3990)
- 3990 / 3 = 1330 (the remainder is 0, so 3 and 1330 are divisors of 3990)
- ...
- 3990 / 62 = 64.354838709677 (the remainder is 22, so 62 is not a divisor of 3990)
- 3990 / 63 = 63.333333333333 (the remainder is 21, so 63 is not a divisor of 3990)