What are the divisors of 4298?
1, 2, 7, 14, 307, 614, 2149, 4298
- There is a total of 8 positive divisors.
- The sum of these divisors is 7392.
- The arithmetic mean is 924.
4 even divisors
2, 14, 614, 4298
4 odd divisors
1, 7, 307, 2149
How to compute the divisors of 4298?
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 4298 by each of the numbers from 1 to 4298 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4298 / 1 = 4298 (the remainder is 0, so 1 is a divisor of 4298)
- 4298 / 2 = 2149 (the remainder is 0, so 2 is a divisor of 4298)
- 4298 / 3 = 1432.6666666667 (the remainder is 2, so 3 is not a divisor of 4298)
- ...
- 4298 / 4297 = 1.0002327205027 (the remainder is 1, so 4297 is not a divisor of 4298)
- 4298 / 4298 = 1 (the remainder is 0, so 4298 is a divisor of 4298)
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 4298 (i.e. 65.559133612335). 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 )
- 4298 / 1 = 4298 (the remainder is 0, so 1 and 4298 are divisors of 4298)
- 4298 / 2 = 2149 (the remainder is 0, so 2 and 2149 are divisors of 4298)
- 4298 / 3 = 1432.6666666667 (the remainder is 2, so 3 is not a divisor of 4298)
- ...
- 4298 / 64 = 67.15625 (the remainder is 10, so 64 is not a divisor of 4298)
- 4298 / 65 = 66.123076923077 (the remainder is 8, so 65 is not a divisor of 4298)