Is there a non-constant, continuous function $f: \mathbb{R} \longrightarrow \mathbb{R}$ such that for all integers $n$, $f$ is $2^n$-periodic?
Notes:
- $n$ can be any integer, and so can be negative as well as positive.
- If I did not require $f$ to be continuous, then I think $f: \mathbb{R} \longrightarrow \mathbb{R}$ defined by: $f(x) = \begin{cases} 1 & \text{$x$ rational} \\ 0 & \text{$x$ irrational} \end{cases}$ would do the trick.