Let's start with $n$ positive but not $1$. We can separate positive and negative $x$, so take any periodic continuous functions $g_1(x)$ and $g_2(x)$ with $g_1(x\pm 1)=g_1(x)$ and $g_2(x\pm 1)=g_2(x)$ - a possibility is they are both constant, while another is that they each have period $1$, and they can be the fame function
- for $x \gt 0$ let $f(x)=x g_1({\log_n (x)})$,
- for $x \lt 0$ let $f(x)=x g_2({\log_n (-x)})$,
- and $f(0)=0$
while for $n=1$ you simply have
- $f(x)$ is any continuous function
and with $n=0$, almost as simply,
- $f(x)$ is any continuous function with $f(0)=0$
It gets slightly more complicated for negative $n \not = -1$. Take a continuous function $h(x)$ on $[0,1]$ with $h(1)=-h(0)$ and extend it to $\mathbb R$ with $h(x\pm 1)=-h(x)$, so if $h$ is ever non-zero then it has period $2$ and $|h|$ has period $1$
- for $x \gt 0$ let $f(x)=x h({\log_{-n} (x)})$,
- for $x \lt 0$ let $f(x)=x h(1+{\log_{-n} (-x)})$,
- and $f(0)=0$
while for $n=-1$ you simply have
- $f(x)$ is any odd continuous function so $f(-x)=-f(x)$ and $f(0)=0$
In particular, $f(x)=0$ is a possible solution for every value of $n$