Skip to main content
1 of 4
Iosif Pinelis
  • 127.7k
  • 8
  • 107
  • 229

$\newcommand\Z{\mathbb Z}\newcommand\R{\mathbb R}$Let $$f(x):=\sum_{n\in\Z}K\Big(\frac{x-2^{-n}}{2^{-n-2}}\Big) =\sum_{n\in\Z}K\Big(\frac{x-2^{-n}}{2^{-n-2}}\Big)1(x\in2^{-n}[3/4,5/4]),$$ where $K$ is a nonzero smooth function such that $K(x)=0$ if $|x|\ge1$.

Then $f$ is smooth on $\R\setminus\{0\}$, $f(0)=0$, and $f(2x)=f(x)$ for all real $x$. Then you condition holds, but $f$ is not even continuous at $0$.

Iosif Pinelis
  • 127.7k
  • 8
  • 107
  • 229