What are the divisors of 3198?
1, 2, 3, 6, 13, 26, 39, 41, 78, 82, 123, 246, 533, 1066, 1599, 3198
- There is a total of 16 positive divisors.
- The sum of these divisors is 7056.
- The arithmetic mean is 441.
8 even divisors
2, 6, 26, 78, 82, 246, 1066, 3198
8 odd divisors
1, 3, 13, 39, 41, 123, 533, 1599
How to compute the divisors of 3198?
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 3198 by each of the numbers from 1 to 3198 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3198 / 1 = 3198 (the remainder is 0, so 1 is a divisor of 3198)
- 3198 / 2 = 1599 (the remainder is 0, so 2 is a divisor of 3198)
- 3198 / 3 = 1066 (the remainder is 0, so 3 is a divisor of 3198)
- ...
- 3198 / 3197 = 1.0003127932437 (the remainder is 1, so 3197 is not a divisor of 3198)
- 3198 / 3198 = 1 (the remainder is 0, so 3198 is a divisor of 3198)
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 3198 (i.e. 56.550862062395). 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 )
- 3198 / 1 = 3198 (the remainder is 0, so 1 and 3198 are divisors of 3198)
- 3198 / 2 = 1599 (the remainder is 0, so 2 and 1599 are divisors of 3198)
- 3198 / 3 = 1066 (the remainder is 0, so 3 and 1066 are divisors of 3198)
- ...
- 3198 / 55 = 58.145454545455 (the remainder is 8, so 55 is not a divisor of 3198)
- 3198 / 56 = 57.107142857143 (the remainder is 6, so 56 is not a divisor of 3198)