What are the divisors of 4172?
1, 2, 4, 7, 14, 28, 149, 298, 596, 1043, 2086, 4172
- There is a total of 12 positive divisors.
- The sum of these divisors is 8400.
- The arithmetic mean is 700.
8 even divisors
2, 4, 14, 28, 298, 596, 2086, 4172
4 odd divisors
1, 7, 149, 1043
How to compute the divisors of 4172?
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 4172 by each of the numbers from 1 to 4172 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4172 / 1 = 4172 (the remainder is 0, so 1 is a divisor of 4172)
- 4172 / 2 = 2086 (the remainder is 0, so 2 is a divisor of 4172)
- 4172 / 3 = 1390.6666666667 (the remainder is 2, so 3 is not a divisor of 4172)
- ...
- 4172 / 4171 = 1.0002397506593 (the remainder is 1, so 4171 is not a divisor of 4172)
- 4172 / 4172 = 1 (the remainder is 0, so 4172 is a divisor of 4172)
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 4172 (i.e. 64.591021047821). 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 )
- 4172 / 1 = 4172 (the remainder is 0, so 1 and 4172 are divisors of 4172)
- 4172 / 2 = 2086 (the remainder is 0, so 2 and 2086 are divisors of 4172)
- 4172 / 3 = 1390.6666666667 (the remainder is 2, so 3 is not a divisor of 4172)
- ...
- 4172 / 63 = 66.222222222222 (the remainder is 14, so 63 is not a divisor of 4172)
- 4172 / 64 = 65.1875 (the remainder is 12, so 64 is not a divisor of 4172)