Find all $f: \mathbb{N}^{*} \longrightarrow \mathbb{N}^{*}$ such that $\forall m, n$ :

$$
f\left(f(m)^{2}+2 f(n)^{2}\right)=m^{2}+2 n^{2}
$$
The idea is to write a number in the form $a^{2}+2 b^{2}$ in two different ways to obtain an equation. We "notice that" $(n+4)^{2}+2(n+1)^{2}=n^{2}+2(n+3)^{2}$. Since $f$ is injective (obvious), we get $f(n+4)^{2}+2 f(n+1)^{2}=f(n)^{2}+2 f(n+3)^{2}$. Let's prove by strong induction that $f(n)=n$. Indeed, we easily get $f(1)=1$ and then by induction, $f(n+4)^{2}=n^{2}+2(n+3)^{2}-2(n+1)^{2}=(n+4)^{2}$, so $f(n+4)=n+4$.