What are the divisors of 4196?
1, 2, 4, 1049, 2098, 4196
- There is a total of 6 positive divisors.
- The sum of these divisors is 7350.
- The arithmetic mean is 1225.
4 even divisors
2, 4, 2098, 4196
2 odd divisors
1, 1049
How to compute the divisors of 4196?
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 4196 by each of the numbers from 1 to 4196 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4196 / 1 = 4196 (the remainder is 0, so 1 is a divisor of 4196)
- 4196 / 2 = 2098 (the remainder is 0, so 2 is a divisor of 4196)
- 4196 / 3 = 1398.6666666667 (the remainder is 2, so 3 is not a divisor of 4196)
- ...
- 4196 / 4195 = 1.0002383790226 (the remainder is 1, so 4195 is not a divisor of 4196)
- 4196 / 4196 = 1 (the remainder is 0, so 4196 is a divisor of 4196)
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 4196 (i.e. 64.776538962807). 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 )
- 4196 / 1 = 4196 (the remainder is 0, so 1 and 4196 are divisors of 4196)
- 4196 / 2 = 2098 (the remainder is 0, so 2 and 2098 are divisors of 4196)
- 4196 / 3 = 1398.6666666667 (the remainder is 2, so 3 is not a divisor of 4196)
- ...
- 4196 / 63 = 66.603174603175 (the remainder is 38, so 63 is not a divisor of 4196)
- 4196 / 64 = 65.5625 (the remainder is 36, so 64 is not a divisor of 4196)