What are the divisors of 729?
1, 3, 9, 27, 81, 243, 729
- There is a total of 7 positive divisors.
- The sum of these divisors is 1093.
- The arithmetic mean is 156.14285714286.
7 odd divisors
1, 3, 9, 27, 81, 243, 729
How to compute the divisors of 729?
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 729 by each of the numbers from 1 to 729 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 729 / 1 = 729 (the remainder is 0, so 1 is a divisor of 729)
- 729 / 2 = 364.5 (the remainder is 1, so 2 is not a divisor of 729)
- 729 / 3 = 243 (the remainder is 0, so 3 is a divisor of 729)
- ...
- 729 / 728 = 1.0013736263736 (the remainder is 1, so 728 is not a divisor of 729)
- 729 / 729 = 1 (the remainder is 0, so 729 is a divisor of 729)
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 729 (i.e. 27). 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 )
- 729 / 1 = 729 (the remainder is 0, so 1 and 729 are divisors of 729)
- 729 / 2 = 364.5 (the remainder is 1, so 2 is not a divisor of 729)
- 729 / 3 = 243 (the remainder is 0, so 3 and 243 are divisors of 729)
- ...
- 729 / 26 = 28.038461538462 (the remainder is 1, so 26 is not a divisor of 729)
- 729 / 27 = 27 (the remainder is 0, so 27 and 27 are divisors of 729)