TITLE: Is the mapping $f: \mathbb{R} \rightarrow [0,1], \ x \mapsto \sum_{n=1}^\infty \frac{\lfloor x^n \rfloor \mod 2}{2^n}$ surjective?
QUESTION [7 upvotes]: Is the mapping
$$
 f: \mathbb{R} \rightarrow [0,1], \ x \mapsto \sum_{n=1}^\infty \frac{\lfloor x^n \rfloor \mod 2}{2^n}
$$
surjective?

If not, what is its image?
If yes, what can be said about images of intervals, besides the obvious $f([-1,1]) = \{0,\frac{2}{3},1\}$?

REPLY [3 votes]: I agree with Johan - it should be surjective. Here is a proof. I claim that $f([4,6])=[0,1]$. Let $[x,y]\subset [4,6]$ be such that $x^k=m$, and $y^k=m+1$. Then $y^{k+1}-x^{k+1}>x(y^k-x^k)=x\geq 4$. Which means  $[x,y]$ contains inside itself two intervals $[x',y']$, and $[y',z']$ such that $(x')^{k+1}=m'$, $(y')^{k+1}=m'+1$, $(z')^{k+1}=m'+2$. Then one proceed recursively.