Create a Turing-machine that decides $A=\{0^{3^n} | n\ge 0\}$
Okay I can't draw and the only tools for visualizing Turing machines aren't the most practical so I'll give you a list of states and how they behave. Note that next refers to the next state and that if next and write aren't assigned the machine doesn't move to another state / doesn't write something.
A brief verbal description since the machine is somewhat big (9 states). There are states for count 0/ count 1 and count 2. Which count zeros...; Now when the machine reaches a third zero it is replaced with X and we are back to &quot;count 0&quot;. Every of those three states has a &quot;back&quot; state responsible for moving back to start if we encounter an &quot;empty&quot;. Notice that if we do not encounter a zero on our way back we are done and have to report accept or reject. If however we encounter a zero on our way back &quot;count i back&quot; switches to state &quot;count i not finished&quot; which if it encounters a &quot;empty&quot; (while moving left) will switch back to &quot;count i&quot; ($i \in \{0,1,2\}$.
&quot;count 0&quot; (initial state)
    read 0: {move: right, next: &quot;count 1&quot;}
    read X: {move: right}
    read empty: {move: left, next: &quot;count 0 back&quot;}
&quot;count 1&quot;
    read 0: {move:  right, next: &quot;count 2&quot;}
    read X: {move: right}
    read empty: {move: left, next: &quot;count 1 back&quot;}
&quot;count 2&quot;:
    read 0: {move: right, write: X, next: &quot;count 0&quot;}
    read X: {move: right}
    read empty: {move: left, next: &quot;count 2 back&quot;}
&quot;count 0 back&quot;
    read X: {move: left}
    read 0: {move: left, next: &quot;count 0 not finished&quot;}
    read empty: reject
&quot;count 1 back&quot;
    read X: {move: left}
    read 0: {move: left, next: &quot;count 1 not finished&quot;}
    read empty: accept
&quot;count 2 back&quot;
    read X: {move: left}
    read 0: {move: left, next: &quot;count 2 not finished&quot;}
    read empty: reject
&quot;count 0 not finished&quot;
    read X/0: {move: left}
    read empty: {move: right, next: &quot;count 0&quot;}
&quot;count 1 not finished&quot;
    read X/0: {move: left}
    read empty: {move: right, next: &quot;count 1&quot;}
&quot;count 2 not finished&quot;
    read X/0: {move: left}
    read empty: {move: right, next: &quot;count 2&quot;}

Hope you get the idea!