What are the divisors of 4342?
1, 2, 13, 26, 167, 334, 2171, 4342
- There is a total of 8 positive divisors.
- The sum of these divisors is 7056.
- The arithmetic mean is 882.
4 even divisors
2, 26, 334, 4342
4 odd divisors
1, 13, 167, 2171
How to compute the divisors of 4342?
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 4342 by each of the numbers from 1 to 4342 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4342 / 1 = 4342 (the remainder is 0, so 1 is a divisor of 4342)
- 4342 / 2 = 2171 (the remainder is 0, so 2 is a divisor of 4342)
- 4342 / 3 = 1447.3333333333 (the remainder is 1, so 3 is not a divisor of 4342)
- ...
- 4342 / 4341 = 1.0002303616678 (the remainder is 1, so 4341 is not a divisor of 4342)
- 4342 / 4342 = 1 (the remainder is 0, so 4342 is a divisor of 4342)
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 4342 (i.e. 65.893854038142). 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 )
- 4342 / 1 = 4342 (the remainder is 0, so 1 and 4342 are divisors of 4342)
- 4342 / 2 = 2171 (the remainder is 0, so 2 and 2171 are divisors of 4342)
- 4342 / 3 = 1447.3333333333 (the remainder is 1, so 3 is not a divisor of 4342)
- ...
- 4342 / 64 = 67.84375 (the remainder is 54, so 64 is not a divisor of 4342)
- 4342 / 65 = 66.8 (the remainder is 52, so 65 is not a divisor of 4342)