What are the divisors of 4198?
1, 2, 2099, 4198
- There is a total of 4 positive divisors.
- The sum of these divisors is 6300.
- The arithmetic mean is 1575.
2 even divisors
2, 4198
2 odd divisors
1, 2099
How to compute the divisors of 4198?
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 4198 by each of the numbers from 1 to 4198 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4198 / 1 = 4198 (the remainder is 0, so 1 is a divisor of 4198)
- 4198 / 2 = 2099 (the remainder is 0, so 2 is a divisor of 4198)
- 4198 / 3 = 1399.3333333333 (the remainder is 1, so 3 is not a divisor of 4198)
- ...
- 4198 / 4197 = 1.0002382654277 (the remainder is 1, so 4197 is not a divisor of 4198)
- 4198 / 4198 = 1 (the remainder is 0, so 4198 is a divisor of 4198)
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 4198 (i.e. 64.7919748117). 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 )
- 4198 / 1 = 4198 (the remainder is 0, so 1 and 4198 are divisors of 4198)
- 4198 / 2 = 2099 (the remainder is 0, so 2 and 2099 are divisors of 4198)
- 4198 / 3 = 1399.3333333333 (the remainder is 1, so 3 is not a divisor of 4198)
- ...
- 4198 / 63 = 66.634920634921 (the remainder is 40, so 63 is not a divisor of 4198)
- 4198 / 64 = 65.59375 (the remainder is 38, so 64 is not a divisor of 4198)