Problem

Source: Romanian IMO TST 2005 - day 5, problem 3

Tags: function, linear algebra, matrix, algebra proposed, algebra



Let $\mathbb{N}=\{1,2,\ldots\}$. Find all functions $f: \mathbb{N}\to\mathbb{N}$ such that for all $m,n\in \mathbb{N}$ the number $f^2(m)+f(n)$ is a divisor of $(m^2+n)^2$.