What are the divisors of 486?
1, 2, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486
- There is a total of 12 positive divisors.
- The sum of these divisors is 1092.
- The arithmetic mean is 91.
6 even divisors
2, 6, 18, 54, 162, 486
6 odd divisors
1, 3, 9, 27, 81, 243
How to compute the divisors of 486?
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 486 by each of the numbers from 1 to 486 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 486 / 1 = 486 (the remainder is 0, so 1 is a divisor of 486)
- 486 / 2 = 243 (the remainder is 0, so 2 is a divisor of 486)
- 486 / 3 = 162 (the remainder is 0, so 3 is a divisor of 486)
- ...
- 486 / 485 = 1.0020618556701 (the remainder is 1, so 485 is not a divisor of 486)
- 486 / 486 = 1 (the remainder is 0, so 486 is a divisor of 486)
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 486 (i.e. 22.045407685049). 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 )
- 486 / 1 = 486 (the remainder is 0, so 1 and 486 are divisors of 486)
- 486 / 2 = 243 (the remainder is 0, so 2 and 243 are divisors of 486)
- 486 / 3 = 162 (the remainder is 0, so 3 and 162 are divisors of 486)
- ...
- 486 / 21 = 23.142857142857 (the remainder is 3, so 21 is not a divisor of 486)
- 486 / 22 = 22.090909090909 (the remainder is 2, so 22 is not a divisor of 486)