What are the divisors of 729?

1, 3, 9, 27, 81, 243, 729

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.

N mod M = 0

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.

Remainder = N ( M × N M )

(where N M 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:

D × d = N

(thus, if N D = d , then N d = D )

  • 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)