What are the divisors of 43?
1, 43
- There is a total of 2 positive divisors.
- The sum of these divisors is 44.
- The arithmetic mean is 22.
2 odd divisors
1, 43
How to compute the divisors of 43?
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 43 by each of the numbers from 1 to 43 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 43 / 1 = 43 (the remainder is 0, so 1 is a divisor of 43)
- 43 / 2 = 21.5 (the remainder is 1, so 2 is not a divisor of 43)
- 43 / 3 = 14.333333333333 (the remainder is 1, so 3 is not a divisor of 43)
- ...
- 43 / 42 = 1.0238095238095 (the remainder is 1, so 42 is not a divisor of 43)
- 43 / 43 = 1 (the remainder is 0, so 43 is a divisor of 43)
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 43 (i.e. 6.557438524302). 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 )
- 43 / 1 = 43 (the remainder is 0, so 1 and 43 are divisors of 43)
- 43 / 2 = 21.5 (the remainder is 1, so 2 is not a divisor of 43)
- 43 / 3 = 14.333333333333 (the remainder is 1, so 3 is not a divisor of 43)
- ...
- 43 / 5 = 8.6 (the remainder is 3, so 5 is not a divisor of 43)
- 43 / 6 = 7.1666666666667 (the remainder is 1, so 6 is not a divisor of 43)