Define Cantor function $F:[0,1]\to [0,1]$ to be $F(x):=\lim_{n\to \infty}{\int}_{n=0}^{\infty}g_n(t)dt$ where
$g_n(t) = \begin{cases} \big({{3\over 2}})^n, & \text{if $t\in C_n$ } \\ 0, & \text{if $t\notin C_n$} \end{cases}$
Where $C_n$ is given by removing the middle third of every interval included in $C_{n-1}$.
Show that if $x\in[{0,{1\over 3}]}$ then $F(x)={1\over 2}{F(2x)}$.
Following that $C_n=[0,{1\over 3^n}]\cup [{2\over 3^n},{1\over 3^{n-1}}]\cup[{2\over 3^{n-1}},{2\over 3^{n-1}}+{1\over 3^n}]\cup [{2\over 3^{n-1}}+{2\over 3^n},{1\over 3^{n-2}}]\cup...\cup[1-{1\over 3^n},1]$, $\int_{0}^{1}g_n(t)dt=\int_{0}^{1}g_n(t)dt={1\over 3^n}\cdot{2^n}\cdot({3\over 2})^n=1$, but I can't figure it out in terms of $x$. $F$ should also satisfy $F(x)={1\over 2}$ if $x\in[{1\over 3},{2\over 3}]$ and $F(x)={1\over 2}F(3x-2)+{1\over 2}$ for $x\in [{2\over 3},1]$.
If $x={2\over 3^{n-k}}, k<n-1$, there are $2^k$ intervals of length ${1\over 3^n}$ whose elements are smaller than $x$, and $\int_{0}^{x}g_n(t)dt={2^k\over 3^n}\cdot({3\over 2})^n$ but I fail to show that $\int_{0}^{2x}g_n(t)dt={2^k\over 3^n}\cdot({3\over 2})^n$ is twice as big. I would appreciate any help with this.