# Does $g$ map $\mathbb{R}$ onto the Cantor set?

For $x\in\mathbb{R}$ define

$$g(x)=1+\tfrac{3}{2}\sum_{k=0}^{\infty}\left(\frac{\left\lfloor2^{2k}x\right\rfloor}{2^{2k}}-\frac{\left\lfloor2^{2k+1}x\right\rfloor}{2^{2k+1}}\right)$$

Desmos link to first four convergents of $g(x)$

Question: Does $g$ map $\mathbb{R}$ onto the middle-thirds Cantor set of $[0,1]$?

One need only consider the question whether $g$ maps the interval $[0,1)$ onto the Cantor set since for $x\in\mathbb{R}$,

$$g(x)=g(x-\lfloor x\rfloor)$$

\begin{align*} g(x) &= g(\lfloor x\rfloor+(x-\lfloor x\rfloor))\\ &= 1+\tfrac{3}{2}\sum_{k=0}^{\infty}\left(\frac{\left\lfloor2^{2k}(\lfloor x\rfloor+(x-\lfloor x\rfloor))\right\rfloor}{2^{2k}}-\frac{\left\lfloor2^{2k+1}(\lfloor x\rfloor+(x-\lfloor x\rfloor))\right\rfloor}{2^{2k+1}}\right)\\ &= 1+\tfrac{3}{2}\sum_{k=0}^{\infty}\left(\frac{2^{2k}\lfloor x\rfloor+\left\lfloor2^{2k}(x-\lfloor x\rfloor)\right\rfloor}{2^{2k}}-\frac{2^{2k+1}\lfloor x\rfloor+\left\lfloor2^{2k+1}(x-\lfloor x\rfloor)\right\rfloor}{2^{2k+1}}\right)\\ &=1+\tfrac{3}{2}\sum_{k=0}^{\infty}\left(\frac{\left\lfloor2^{2k}(x-\lfloor x\rfloor)\right\rfloor}{2^{2k}}-\frac{\left\lfloor2^{2k+1}(x-\lfloor x\rfloor)\right\rfloor}{2^{2k+1}}\right)\\ \end{align*}

• It seems that $g$ sends each number $x$ in $(0,1)$ such that $$x=\sum_{n=1}^\infty\frac{b_n(x)}{2^n}$$ with $b_n(x)=0,1$ to $$g(x)=1-\frac32\sum_{k=0}^\infty\frac{b_{2k+1}(x)}{2^{2k+1}}=\sum_{k=1}^\infty\frac{1}{2^k}-\sum_{k=0}^\infty\frac{b_{2k+1}(x)}{2^{2k+1}}-\sum_{k=0}^\infty\frac{b_{2k+1}(x)}{2^{2k+2}}=\sum_{k=1}^\infty\frac{c_k(x)}{2^k},$$ where, for every $k\geqslant0$, $$c_{2k+1}(x)=c_{2k+2}(x)=1-b_{2k+1}(x).$$ Thus $S=g(\mathbb R)$ solves $$S=\frac14S+\frac14\left(\frac34+S\right),$$ and $S$ is a Cantor set, not the standard one, but the one where one drops the middle-halves. – Did May 28 '16 at 5:58
• In other words, the recursive step to build $S$ is $$[0,1]\to[0,\tfrac14]\cup[\tfrac34,1]$$ rather than $$[0,1]\to[0,\tfrac13]\cup[\tfrac23,1]$$ in the standard case. – Did May 28 '16 at 5:59
• Of course, I should have seen that. On the Desmos graph there is a wide-open space on the interval $(0.25,0.75)$. – John Wayland Bales May 28 '16 at 6:04