I know that the ternary expansion of $1/4$ is $0.020202\cdots$. The verification is easy: $0.020202\cdots$ is nothing but the infinite series $2/3^2+2/3^4+2/3^6+\cdots $ which converges to $1/4$.
Question: How can I arrive at the ternary expansion of $1/4$?
I tried in the following way: Let $1/4=a_1/3+ a_2/3^2+ a_3/3^3+\cdots$. Multiplying by $4$, we arrive at $1=(4a_1)/3+(4a_2)/3^2+\cdots = a_1 + (a_1+a_2)/3+ (a_2+a_3)/3^2+\cdots $.
Now I can take ternary expansions of $1$ as either $1.0000\cdots $ or $0.22222\cdots $. Preferring second, I obtained $a_1=0$, $a_1+a_2=2$, $a_2+a_3=2$, $\cdots$, which implies that $a_1=a_3=a_5=\cdots = 0$ and $a_2=a_4=a_6=\cdots = 2$, as per our expectation.
However, if I use the $1=1.00000$, and do the same process, I arrive at $a_1=1$, $a_1+a_2=0$, $a_2+a_3=0$ $\cdots$. I couldn't proceed further.
How can we arrive at the ternary expansion of $1/4$ systematically?