TITLE: Does a function exist with the property $f(-n^2+3n+1)=(f(n))^2+1$?
QUESTION [5 upvotes]: Let $f:\mathbb{R}\to \mathbb{R}$ be a function which fulfills for every $n \in \mathbb{N}$ 
$$f(-n^2+3n+1)=(f(n))^2+1$$
Is it possible that such a function exists?

REPLY [13 votes]: The main idea here is writing at first some of the equations you get and look if they have common terms. Indeed here the terms for $n=3$ and $n=1$ are very  interessting, as in both only occur $f(1)$ and $f(3)$.
\begin{align*}
f(3)&=1+f(1)^2 \tag{$i$}\\
f(1)&=1+f(3)^2 \tag{$ii$}\\
\end{align*}
As we don't know that much lets try to get an equation only having $f(1)$.
At first we have this equation:
$$f(1)=1+f(3)^2$$
No we use $(i)$ to express $f(3)$ in terms of $f(1)$
$$f(1)= 1+(1+f(1)^2)^2=1+1^2+2f(1)^2+f(1)^4$$ 
is that possible?
Note that $f(1)$ is a solution of 
$$0= 2-x+2x^2+x^4$$
but this one has no real solution, hence your function can't exist,
as  for $x \in [0,1]$ 
$$2-x+2x^2+x^4\geq 2-x> 0 $$
and for $x\in [1,\infty)$ we know that  $x<x^2$ and hence
$$2-x+2x^2+x^4 \geq 2+x^2+x^4>0$$
and for $x\in (-\infty,0]$ 
$$2-x+2x^2+x^4 \geq 2+2x^2 +x^4 >0$$