TITLE: If $f(3x)=f(x)$ and $f$ is continuous, show that $f(x)$ is a constant function.
QUESTION [13 upvotes]: If $f(x)$ is a continuous function such that $f(3x)=f(x)$ and the domain of $f$ is all non-negative real numbers. Prove that $f$ is a constant function.
What I did:
$$f(3x)=f(x)=f\left(\frac{x}{3}\right)=\cdots= f\left(\frac{x}{3^n}\right)$$
Now as $n$ tends to infinity, $f(\frac{x}{3^n})$ tends to $f(0)$ and hence $f(x)=f(0)$ for all $x$.
However, I think the second step is a bit dodgy. I can't quite tell how, since I lack sufficient mathematical maturity, but it just doesn't seem right. I'd be glad if someone could provide a more rigorous proof of the problem. Thanks in advance.

REPLY [6 votes]: Your argument is not dodgy at all. $f(x)$ being continuous at $x = 0$ is equivalent to the statement that for all $a_1,a_2,...$ converging to $0$ one has $f(a_1), f(a_2),...$ converges to $f(0)$. So take $a_n = {x \over 3^n}$ in your example.