Cantor function sends ternary expansions to binary expansions Let $F_0(x)=x$
The Cantor set in $[0,1]$, obtained by removing middle thirds.
Then we have a Cantor function $F(\sum_{k=1}^{\infty} a_{k}3^{-k})=\sum_{k=1}^{\infty}\frac{a_k}{2}2^{-k}$ for $a_k \in \{0,2\}$.
I don't understand why is Cantor function mapping ternary expansion of elements in the Cantor set to some binary expansion on $[0,1]$. This may be related to the definition of Cantor set, but I don't see it.
Any help would be appreciated. 
 A: In decimal expansion, like in decimal notation, each digit represents a power of $10$, but to a negative power. So, for example, $0.812075$ represents the number
$8\times 10^{-1} + 1\times 10^{-2} + 2\times 10^{-3} + 0\times 10^{-4} + 7\times 10^{-5} + 5\times 10^{-6}$. The digits can be $0$, $1,\ldots,9$. There is a subtletly that some numbers have two decimal expansions: you can have either a “tail of $9$s” or a tail of $0$s: so $0.5$ is the same as $0.4999999\ldots$.
In ternary expansion, you do the same but with powers of $3$; so the “digits” can only be $0$, $1$, or $2$. In binary expansion, you use powers of $2$, and the “digits” can only be $0$ or $1$. As with decimal expansion, some numbers have two ternary expansions (tails of $2$s or tails of $0$s), and some have two binary expansions.
The Cantor set consists precisely of those numbers in $[0,1]$ which have at least one ternary expansion in which every digit is either a $0$ or a $2$.
So the domain of your function $F$ consists of numbers that are of the form
$$\sum_{i=1}^{\infty} a_n3^{-n},\qquad $a_i=0\text{ or }2\text{ for each }i.$$
So you take a number written in ternary notation using only $0$s and $2$s, and you turn it into a number written in binary notation by keeping every $0$ digit as a $0$, and turning every $2$-digit into a $1$. 
That’s the function described. You get every possible number in $[0,1]$ this way, since any such number, after you write it in binary notation, comes from a number in the Cantor Set; which number? the one where all the positions with a $1$ in the “target” had a $2$.
