What are the divisors of 4030?
1, 2, 5, 10, 13, 26, 31, 62, 65, 130, 155, 310, 403, 806, 2015, 4030
- There is a total of 16 positive divisors.
- The sum of these divisors is 8064.
- The arithmetic mean is 504.
8 even divisors
2, 10, 26, 62, 130, 310, 806, 4030
8 odd divisors
1, 5, 13, 31, 65, 155, 403, 2015
How to compute the divisors of 4030?
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 4030 by each of the numbers from 1 to 4030 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4030 / 1 = 4030 (the remainder is 0, so 1 is a divisor of 4030)
- 4030 / 2 = 2015 (the remainder is 0, so 2 is a divisor of 4030)
- 4030 / 3 = 1343.3333333333 (the remainder is 1, so 3 is not a divisor of 4030)
- ...
- 4030 / 4029 = 1.000248200546 (the remainder is 1, so 4029 is not a divisor of 4030)
- 4030 / 4030 = 1 (the remainder is 0, so 4030 is a divisor of 4030)
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 4030 (i.e. 63.482280992416). 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 )
- 4030 / 1 = 4030 (the remainder is 0, so 1 and 4030 are divisors of 4030)
- 4030 / 2 = 2015 (the remainder is 0, so 2 and 2015 are divisors of 4030)
- 4030 / 3 = 1343.3333333333 (the remainder is 1, so 3 is not a divisor of 4030)
- ...
- 4030 / 62 = 65 (the remainder is 0, so 62 and 65 are divisors of 4030)
- 4030 / 63 = 63.968253968254 (the remainder is 61, so 63 is not a divisor of 4030)