I am wondering what non-constant functions satisfy the functional equation:
$$f(x) = g(x) + \frac1{f(x^n)}$$
For some $n \in \mathbb{N}$ on a domain for which $f(x^{nk}) \neq 0$. For the $n=1$ case, we have $$f(x)^2-f(x)g(x)-1=0 \implies f(x) =\frac{g(x)\pm \sqrt{g(x)^2+4}}{2}$$ So we may choose just about any $g(x)$ and find a satisfactory $f(x)$. But I am unsure how to find solutions for $n>1$. How might I begin? Are there any known examples?
Additional question, need not be answered: are there any examples of compositions of elementary functions satisfying the highlighted equation, not of the form $x^a+b$?