TITLE: Can we find a periodic function $f$ with a non-zero smallest period such that $f(x^2)$ is also periodic?
QUESTION [5 upvotes]: Let $f$ be a periodic function such that it has a (non-zero) fundamental period (Smallest nonzero period). Can 
 $f(x^2)$ also be periodic?   
So the constant functions and Dirichlet function are not examples we want here. 
If $f$ is continuous, then it is impossible, because $f(x^2)$ fails to be uniformly continuous.

REPLY [3 votes]: I think the answer is yes.  Choose a transcendental constant $\alpha$.  Consider the equivalence relation $\sim$ on $\mathbb R$ generated (as a transitive closure) by  $x \sim x \pm 1$ and $x^2 \sim (x\pm \alpha)^2$.
Note that all equivalence classes are countable.  Take $f(x) = 1$ if $x \sim 0$ and $f(x) = 0$ otherwise.  Then $f$ has period $1$ and $f(x^2)$ has period $\alpha$.
I'm pretty sure that there is no non-integer rational $r$ such that $0 \sim r$, implying that $1$ is the fundamental period of $f$, as any chain of equivalences $x \sim x \pm 1$ or $x^2 \sim (x \pm \alpha)^2$ starting with $0$ and ending at $r$ would imply a polynomial identity for $\alpha$.