1
$\begingroup$

So there was another question I managed to figure out similar to this one, which was "The number 538 is written on the board. At each step, a number N on the board can be replaced either by N − 1, or by N/2, provided that N is even. What’s the minimum number of steps to get from 538 to 0?"

I found a fast way to do this, which was to change 538 (or any other number) to binary form, and look at the last digit to perform the two operations. If the binary form ends in 0, 1) you use the divide by 2 operation and remove the 0. If the binary form ends in 1, 2) you use the minus 1 operation and change the ending digit to 0, where you proceed with 1). Ex: 538=1000011010, so you do divide by 2, minus 1, divide by 2, divide by 2, minus 1, divide by 2, minus 1, divide by 2, divide by 2, divide by 2, divide by 2, divide by 2, and then minus 1.

Is there a way to do this in the ternary system with a divide by 9 operation? Ex: if number in ternary end in 0, divide by 9 and remove 0 or something like that. I am asking if there is a rule where you can determine if a number is divisible by 9 in ternary without converting it to base ten.

1 Answers 1

4

Every number divisible by 9 has two zeroes at the end of its ternary expansion. The operation to remove a single zero from the end is divide by 3.

  • 0
    So this means that if the ternary expansion has 2 zeroes at the end, it is divisible by 9? Is there a reason for this?2017-01-10
  • 0
    @GerardL. $9 = 3^2$.2017-01-10
  • 0
    I have a basic understanding of the 0, 1, and in this case 2 system. What does it mean to end with two 0s? Why couldn't it contain a 1?2017-01-10
  • 1
    @GerardL., just like in base $10$, in base $3$, ending with two zeroes precisely means being divisible by $100_3$. It just happens that $100_3 = 9_{10}$.2017-01-10