Q:

Is $4$ the only power of $2$ with a ternary representation consisting of only odd digits?

$2^2 = 11_3$
$2^3 = 22_3$ (even digits only)
$2^4 = 121_3$ (one even digit)
I've looked at the powers of $2$ this way up to $2^{25}$, which of course doesn't prove I'm right, for I might stop right before the counterexample.
The ternary repunits are numbers of the form $$\frac{3^n - 1}{2}$$ and from this (if I'm on the right track), the proof or disproof of my intuition should readily follow. Then I started thinking about Fermat's little theorem and got myself all confused.

A:

You essentially wish to determine for which $n$ the value $3^n-1$ is a power of two.  I claim that $n$ must be $1$ or $2$.
Note that $3^{2k+1}-1$ is equal to $2$ mod $4$ for any $k$.  This means that the only odd $n$ such that $3^n-1$ is a power of $2$ is $n=1$.
If $n=2k$ is even, then write $3^{2k}-1 = (3^k-1)(3^k+1)$.  If this is a power of two, then both $3^k-1$ and $3^{k}+1$ are powers of two, in which case they must be $2$ and $4$, and thus $n=2$.

A:

$2^0=1=1_3$ consists only of odd digits.  I assume you meant to exclude that as well.  There is no other besides $1$ and $4$.  As you say, the $n$ digit repunit is $\frac 12(3^n-1)$, so we would have to have $3^n-1=2^m$ for some $n,m$.  Catalan's conjecture (now Mihăilescu's theorem) says that the only perfect powers that differ by $1$ are $3^2=9$ and $2^3=8$

