4. Determine all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ satisfying

$$
f\left(f(m)^{2}+2 f(n)^{2}\right)=m^{2}+2 n^{2} \quad \text { for all } m, n \in \mathbb{N}
$$

(Bulgaria)
4. We start by observing that $f$ is injective. From the known identity

$$
\left(a^{2}+2 b^{2}\right)\left(c^{2}+2 d^{2}\right)=(a c \pm 2 b d)^{2}+2(a d \mp b c)^{2}
$$

we obtain $f(a c+2 b d)^{2}+2 f(a d-b c)^{2}=f(a c-2 b d)^{2}+2 f(a d+b c)^{2}$, assuming that the arguments are positive integers. Specially, for $b=c=d=1$ and $a \geq 3$ we have $f(a+2)^{2}+2 f(a-1)^{2}=f(a-2)^{2}+2 f(a+1)^{2}$. Denoting $g(n)=f(n)^{2}$ we get a recurrent relation $g(a+2)-2 g(a+1)+2 g(a-1)-g(a-2)=0$ whose characteristic polynomial is $(x+1)(x-1)^{3}$, which leads to

$$
g(n)=A(-1)^{n}+B+C n+D n^{2}
$$

Substituting $m=n$ in the original equation yields $g(3 g(n))=9 n^{4}$, which together with $(\dagger)$ gives us

$$
\begin{aligned}
L=9 n^{4} & =A(-1)^{3\left(A(-1)^{n}+B+C n+D n^{2}\right)}+B+\underbrace{3 C\left[A(-1)^{n}+B+C n+D n^{2}\right]} \\
& +9 D\left[A(-1)^{n}+B+C n+D n^{2}\right]^{2}=R .
\end{aligned}
$$

Since $0=\lim _{n \rightarrow \infty} \frac{R-L}{n^{4}}=9 D^{3}-9$, we have $D^{3}=1$ (so $D \neq 0$ ); similarly, $0=\lim _{n \rightarrow \infty} \frac{R-L}{n^{3}}=18 D^{2} C$, so $C=0$. Moreover, for $n=2 k$ and $n=2 k+1$
respectively we obtain $0=\lim _{k \rightarrow \infty} \frac{R-L}{(2 k)^{2}}=18 D^{2}(A+B)$ and $0=\lim _{k \rightarrow \infty} \frac{R-L}{(2 k+1)^{2}}=$ $18 D^{2}(-A+B)$, implying $A+B=-A+B=0$; hence $A=B=0$.

Finally, $g(n)=D n^{2}, D^{3}=1$ and $g: \mathbb{N} \rightarrow \mathbb{N}$ gives us $D=1$, i.e. $f(n)=n$. It is directly verified that this function satisfies the conditions of the problem.

Remark. Using limits can be avoided. Since the rigth-hand side in ( $\dagger$ ) takes only integer values, it follows that $A, B, C, D$ are rational, so taking suitable multiples of integers for $n$ eliminates the powers of -1 and leaves a polynomial equality.

## Mathematical Competitions in Serbia

$h t t p: / /$ srb.imomath.com/

〜 n 〜 〜

The IMO Compendium Olympiad Archive Mathematical Society of Serbia
http://www.imocompendium.com/ http://www.dms.org.rs/

![](https://cdn.mathpix.com/cropped/2024_06_04_1c26782c9775d73d6a0ag-16.jpg?height=407&width=271&top_left_y=1957&top_left_x=336)

## The IMO Compendium

This book attempts to gather all the problems appearing on the IMO, as well as the so-called short-lists from 35 years, a total of 864 problems, all of which are solved, often in more than one way. The book also contains 1036 problems from various long-lists over the years, for a grand total of 1900 problems. In short, The IMO Compendium is an invaluable resource, not only for highschool students preparing for mathematical competitions, but for anyone who loves and appreciates math.

Publisher: Springer (2006); Hardcover, 746 pages; Language: English; ISBN: 0387242996 For information on how to order, visit http://www.imocompendium.com/