For $x\in [0,1]$, let $a_{nx}$ denote a ternary representation of $x$, i.e. $x=\sum_{n=1}^\infty a_{nx}/3^n$.
Note that a choice of $a_{nx}$ is not unique.
With this notation, I want to prove the following:
Let $x\in [0,1]$ and $N\in\mathbb{Z}^+$. Then, there exists $\delta>0$ such that for each $y\in [0,1]$ with $0<|x-y|<\delta$, there exist representations $a_{nx}$ and $a_{ny}$ such that $min\{n:a_{nx}\neq a_{ny}\}\geq N$.
I tried to divide into several cases to prove the above statement. I could prove everything without the below case:
Let $x\in [0,1]$.
Let $S$ be the set of $y\in[0,1]$ satisfying the following:
$y-\delta <x<y$ (We don’t know $\delta$ yet, but say we have)
$x$ and $y$ have representations $a_{nx}$ and $a_{ny}$ respectively with $m$ the smallest integer such that $a_{mx}\neq a_{my}$ and that $a_{mx}+1=a_{my}$ and $a_{nx}$’s are not all $2$ for $n>m$ and $a_{ny}$’s are not all $0$ for $n>m$.
Which $\delta$ should I choose to make $m\geq N$ for all $y\in S$?
How can I find such $\delta$?
The $x$ with two representations are those rationals of the form $\frac a{3^n}$ for some $n$. One representation terminates and all the following $a_{nx}$ are zero, the other finishes with all the $a_{nx}$ being $2$. The argument is different depending on whether $x$ is of this form with $n \lt N$ or not.
If $x$ is not of the form $\frac a{3^N}$ there is some $z$ of the form $\frac b{3^N}$ closest to $x$. We can take $\delta \lt |z-x|$ and guarantee that the first $N$ digits of the expansion of any number in $(x-\delta, x+\delta)$ agree with the expansion of $x$
If $x$ is of the form $\frac a{3^N}$ it has two expansions. For $y \lt x$ we use the one that ends in $2$s and for $y \gt x$ we use the one that ends in $0$s. We can use $\delta=3^{-N}$. All the $y\in (x-\delta,x)$ will agree with the expansion ending in $2$s up to position $N$. All the $y \in (x,x+\delta)$ will agree with the expansion ending in $0$s up to position $N$.