Find the function $f$ such that $f(m^2 + f(n))=(f(m))^2 + n$ 
Find all functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ such that
  $f(m^2 + f(n))=(f(m))^2 + n, \forall m,n \in \mathbb{Z} \tag 1$


If $m=0$ then $f(f(n))=f^2(0) + n \tag 2, \forall n$
From (2) $f \circ f$ is injective, therefore $f$ is injective.
Replacing $n=0, m:=-m$ in (1) we get $f(m^2 + f(0))=f^2(-m)$ therefore $f^2(m)=f^2(-m), \forall m \tag3$
From (3), using $f$ injectivity we get $f(-m)=-f(m), \forall m \ne 0 \tag 4$
Replacing $n:=-n$ in (2) we get $f(f(-n))=(f(0))^2 - n \tag 5$ and, from (4) and
 (5)  $-f(f(n))=f^2(0) - n \tag 6$
Now, from (2) and (6) we get $f(0)=0$ therefore: $f(f(n))=n, \forall n \tag 7$ The last one proves $f$ is also surjective, therefore bijective.
It's also easy to prove $f(1)=1$. I have strong feelings that $f(n)=n, \forall n$ is the only solution, but I cannot prove it. 
Any help is appreciated.

Well, if it's really easy to prove $f(1)=1$: $m=1$ gives $f(f(n)+1)=n+1,$ replacing $n$ by $f(n)$ and using $f(f(n))=n$ gives $f(n+1)=f(n)+1.$ The rest is obvious.
