What are the divisors of 4990?
1, 2, 5, 10, 499, 998, 2495, 4990
- There is a total of 8 positive divisors.
- The sum of these divisors is 9000.
- The arithmetic mean is 1125.
4 even divisors
2, 10, 998, 4990
4 odd divisors
1, 5, 499, 2495
How to compute the divisors of 4990?
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 4990 by each of the numbers from 1 to 4990 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4990 / 1 = 4990 (the remainder is 0, so 1 is a divisor of 4990)
- 4990 / 2 = 2495 (the remainder is 0, so 2 is a divisor of 4990)
- 4990 / 3 = 1663.3333333333 (the remainder is 1, so 3 is not a divisor of 4990)
- ...
- 4990 / 4989 = 1.0002004409701 (the remainder is 1, so 4989 is not a divisor of 4990)
- 4990 / 4990 = 1 (the remainder is 0, so 4990 is a divisor of 4990)
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 4990 (i.e. 70.639932049797). 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 )
- 4990 / 1 = 4990 (the remainder is 0, so 1 and 4990 are divisors of 4990)
- 4990 / 2 = 2495 (the remainder is 0, so 2 and 2495 are divisors of 4990)
- 4990 / 3 = 1663.3333333333 (the remainder is 1, so 3 is not a divisor of 4990)
- ...
- 4990 / 69 = 72.31884057971 (the remainder is 22, so 69 is not a divisor of 4990)
- 4990 / 70 = 71.285714285714 (the remainder is 20, so 70 is not a divisor of 4990)