Let's define an integer $n$ as zero-avoiding in some base $b$ when its representation in base $b$ has no zero digits (excluding leading zeros of course)
I'd like to prove the following claim which empirically looks true:
an integer $n > 7$ is zero avoiding in base $2$ and $3$ if and only if $n = 2^{15}-1 = 32767$
To make things simpler, we can remove base $2$ and replace $n$ by a certain $2^m - 1$, making my initial claim equivalent to: $$2^m-1 \text{ is zero avoiding in base $3$ if and only if } m = 15$$
I've checked this claim for $m$ up to $100000$, and so far the only candidate is indeed at $m=15$
A few notes:
- We can suppose $m$ odd: when $m$ is even, $2^m-1$ is divisible by $3$, so it has a digit $0$ in base $3$
- For a given ternary length $d$, only a unique $m$ can make $2^m - 1$ zero-avoiding in base $3$
That second point seems to me as the most promising if we can reduce the claim to a finite number of lengths $d$. Here's a short proof of the uniqueness given a length:
Let $d$ be the length wanted, and $m$ such that $2^m-1$ is zero-avoiding in base $3$
Therefore, we have $(a_0, \ldots, a_d)$ all in the set $\{ 1,2\}$ such that $2^m-1 = \displaystyle \sum_{k=0}^{d-1} a_k3^k$
So that gives $\displaystyle \sum_{k=0}^{d-1} 3^k \leq 2^m-1 \leq 2\sum_{k=0}^{d-1} 3^k \iff N \leq 2^m-1 \leq 2N$ for $N = \displaystyle \sum_{k=0}^{d-1} 3^k = \frac{1}{2} (3^d - 1)$
Solving for $m$ gives $\log_2(N+1) \leq m \leq \log_2(2N+1)$, but the interval $\log_2(N+1), \log_2(2N+1)$ is of length less than $1$
This means $m = \lfloor d\log_2(3) \rfloor$, which shows uniqueness of $m$ given the length $d$
I'm not well versed enough regarding this, but maybe Baker's method can help find an upper bound for $d$?
I am aware that a similar question has been asked before, but here we restrict ourselves to base $3$, and the addition of uniqueness along with Baker's theorem might bring something new