Background Facts
- It is known that every number in the Cantor set $\mathcal{C}$ has a ternary expansion, where $a_k \in \{0,2\}$:
$$ x=\sum_{k=1}^{\infty} a_{k} 3^{-k} $$
- Cantor set has the representation
$$\mathcal{C}=[0,1] \backslash \bigcup_{n=0}^{\infty} \bigcup_{k=0}^{3^{n}-1}\left(\frac{3 k+1}{3^{n+1}}, \frac{3 k+2}{3^{n+1}}\right)$$
Problem
What exactly is the relationship between (2.) and (1.)? That is, how should one go about proving that
$$ x \in \mathcal{C} \iff x=\sum_{k=1}^{\infty} a_{k} 3^{-k}\, \,\,\,\,\,\,,a_k \in \{0,2\}$$
Progress
Following the proof which appears in Representation of elements in Cantor set., I have problem understanding why if $a_{k} \neq 0$ for some $k>n,$ then $x \in\left(\frac{3 k+1}{3^{n}}, \frac{3 k+2}{3^{n}}\right)$ for some $n .$
I can see that $x \geq \frac{1}{3^n} + \frac{1}{3^k}$, but how can one prove $x$ indeed lies in the given interval?