I came across this question in an answer given to a question here on MSE.
Given that $f(a)=f(a^2)$ for all $a\in [0,1]$,$f$ continuous, it is easy to prove by induction that $p(n): f(a) = f(a^{2^{n}})$ for all $a\in [0,1]$ and for all $n\in \mathbb{N}$.
I am having a hard time proving it. Here's my attempt though, and I'll appreciate any help I can get.
For $n=1$, $p(n)$ is true.
Now , suppose it is true for $n=k$. i.e. $f(a)=f\left(a^{2^{k}}\right)$ and consider it for for $n=k+1$. So we would have $$ f\left(a^{2^{k+1}}\right)=f\left(a^{2^k}\cdot a^2\right)$$
Now this is where I get stuck.
Okay, so thanks to the quick answers below, I see where I went wrong. I make some modification to the $k+1$ step. $$ f\left(a^{2^{k+1}}\right)=f\left(a^{2^k}\cdot a^{2^k}\right)=f\left(\left(a^{2^k}\right)^2\right)=f(a)~~\text{by the induction hypothesis}.$$