What are the divisors of 598?
1, 2, 13, 23, 26, 46, 299, 598
- There is a total of 8 positive divisors.
- The sum of these divisors is 1008.
- The arithmetic mean is 126.
4 even divisors
2, 26, 46, 598
4 odd divisors
1, 13, 23, 299
How to compute the divisors of 598?
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 598 by each of the numbers from 1 to 598 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 598 / 1 = 598 (the remainder is 0, so 1 is a divisor of 598)
- 598 / 2 = 299 (the remainder is 0, so 2 is a divisor of 598)
- 598 / 3 = 199.33333333333 (the remainder is 1, so 3 is not a divisor of 598)
- ...
- 598 / 597 = 1.001675041876 (the remainder is 1, so 597 is not a divisor of 598)
- 598 / 598 = 1 (the remainder is 0, so 598 is a divisor of 598)
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 598 (i.e. 24.454038521275). 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 )
- 598 / 1 = 598 (the remainder is 0, so 1 and 598 are divisors of 598)
- 598 / 2 = 299 (the remainder is 0, so 2 and 299 are divisors of 598)
- 598 / 3 = 199.33333333333 (the remainder is 1, so 3 is not a divisor of 598)
- ...
- 598 / 23 = 26 (the remainder is 0, so 23 and 26 are divisors of 598)
- 598 / 24 = 24.916666666667 (the remainder is 22, so 24 is not a divisor of 598)