What are the divisors of 3960?
1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 15, 18, 20, 22, 24, 30, 33, 36, 40, 44, 45, 55, 60, 66, 72, 88, 90, 99, 110, 120, 132, 165, 180, 198, 220, 264, 330, 360, 396, 440, 495, 660, 792, 990, 1320, 1980, 3960
- There is a total of 48 positive divisors.
- The sum of these divisors is 14040.
- The arithmetic mean is 292.5.
36 even divisors
2, 4, 6, 8, 10, 12, 18, 20, 22, 24, 30, 36, 40, 44, 60, 66, 72, 88, 90, 110, 120, 132, 180, 198, 220, 264, 330, 360, 396, 440, 660, 792, 990, 1320, 1980, 3960
12 odd divisors
1, 3, 5, 9, 11, 15, 33, 45, 55, 99, 165, 495
How to compute the divisors of 3960?
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 3960 by each of the numbers from 1 to 3960 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3960 / 1 = 3960 (the remainder is 0, so 1 is a divisor of 3960)
- 3960 / 2 = 1980 (the remainder is 0, so 2 is a divisor of 3960)
- 3960 / 3 = 1320 (the remainder is 0, so 3 is a divisor of 3960)
- ...
- 3960 / 3959 = 1.0002525890376 (the remainder is 1, so 3959 is not a divisor of 3960)
- 3960 / 3960 = 1 (the remainder is 0, so 3960 is a divisor of 3960)
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 3960 (i.e. 62.928530890209). 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 )
- 3960 / 1 = 3960 (the remainder is 0, so 1 and 3960 are divisors of 3960)
- 3960 / 2 = 1980 (the remainder is 0, so 2 and 1980 are divisors of 3960)
- 3960 / 3 = 1320 (the remainder is 0, so 3 and 1320 are divisors of 3960)
- ...
- 3960 / 61 = 64.918032786885 (the remainder is 56, so 61 is not a divisor of 3960)
- 3960 / 62 = 63.870967741935 (the remainder is 54, so 62 is not a divisor of 3960)