What are the divisors of 3040?
1, 2, 4, 5, 8, 10, 16, 19, 20, 32, 38, 40, 76, 80, 95, 152, 160, 190, 304, 380, 608, 760, 1520, 3040
- There is a total of 24 positive divisors.
- The sum of these divisors is 7560.
- The arithmetic mean is 315.
20 even divisors
2, 4, 8, 10, 16, 20, 32, 38, 40, 76, 80, 152, 160, 190, 304, 380, 608, 760, 1520, 3040
4 odd divisors
1, 5, 19, 95
How to compute the divisors of 3040?
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 3040 by each of the numbers from 1 to 3040 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3040 / 1 = 3040 (the remainder is 0, so 1 is a divisor of 3040)
- 3040 / 2 = 1520 (the remainder is 0, so 2 is a divisor of 3040)
- 3040 / 3 = 1013.3333333333 (the remainder is 1, so 3 is not a divisor of 3040)
- ...
- 3040 / 3039 = 1.0003290556104 (the remainder is 1, so 3039 is not a divisor of 3040)
- 3040 / 3040 = 1 (the remainder is 0, so 3040 is a divisor of 3040)
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 3040 (i.e. 55.136195008361). 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 )
- 3040 / 1 = 3040 (the remainder is 0, so 1 and 3040 are divisors of 3040)
- 3040 / 2 = 1520 (the remainder is 0, so 2 and 1520 are divisors of 3040)
- 3040 / 3 = 1013.3333333333 (the remainder is 1, so 3 is not a divisor of 3040)
- ...
- 3040 / 54 = 56.296296296296 (the remainder is 16, so 54 is not a divisor of 3040)
- 3040 / 55 = 55.272727272727 (the remainder is 15, so 55 is not a divisor of 3040)