What are the divisors of 423?
1, 3, 9, 47, 141, 423
- There is a total of 6 positive divisors.
- The sum of these divisors is 624.
- The arithmetic mean is 104.
6 odd divisors
1, 3, 9, 47, 141, 423
How to compute the divisors of 423?
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 423 by each of the numbers from 1 to 423 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 423 / 1 = 423 (the remainder is 0, so 1 is a divisor of 423)
- 423 / 2 = 211.5 (the remainder is 1, so 2 is not a divisor of 423)
- 423 / 3 = 141 (the remainder is 0, so 3 is a divisor of 423)
- ...
- 423 / 422 = 1.0023696682464 (the remainder is 1, so 422 is not a divisor of 423)
- 423 / 423 = 1 (the remainder is 0, so 423 is a divisor of 423)
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 423 (i.e. 20.566963801203). 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 )
- 423 / 1 = 423 (the remainder is 0, so 1 and 423 are divisors of 423)
- 423 / 2 = 211.5 (the remainder is 1, so 2 is not a divisor of 423)
- 423 / 3 = 141 (the remainder is 0, so 3 and 141 are divisors of 423)
- ...
- 423 / 19 = 22.263157894737 (the remainder is 5, so 19 is not a divisor of 423)
- 423 / 20 = 21.15 (the remainder is 3, so 20 is not a divisor of 423)