What are the divisors of 5198?
1, 2, 23, 46, 113, 226, 2599, 5198
- There is a total of 8 positive divisors.
- The sum of these divisors is 8208.
- The arithmetic mean is 1026.
4 even divisors
2, 46, 226, 5198
4 odd divisors
1, 23, 113, 2599
How to compute the divisors of 5198?
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 5198 by each of the numbers from 1 to 5198 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5198 / 1 = 5198 (the remainder is 0, so 1 is a divisor of 5198)
- 5198 / 2 = 2599 (the remainder is 0, so 2 is a divisor of 5198)
- 5198 / 3 = 1732.6666666667 (the remainder is 2, so 3 is not a divisor of 5198)
- ...
- 5198 / 5197 = 1.0001924187031 (the remainder is 1, so 5197 is not a divisor of 5198)
- 5198 / 5198 = 1 (the remainder is 0, so 5198 is a divisor of 5198)
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 5198 (i.e. 72.097156670704). 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 )
- 5198 / 1 = 5198 (the remainder is 0, so 1 and 5198 are divisors of 5198)
- 5198 / 2 = 2599 (the remainder is 0, so 2 and 2599 are divisors of 5198)
- 5198 / 3 = 1732.6666666667 (the remainder is 2, so 3 is not a divisor of 5198)
- ...
- 5198 / 71 = 73.211267605634 (the remainder is 15, so 71 is not a divisor of 5198)
- 5198 / 72 = 72.194444444444 (the remainder is 14, so 72 is not a divisor of 5198)