Problem

Source: Iranian third round 2018 number theory exam problem 3

Tags: number theory, functional equation, Iran, IranMO



Find all functions $f:\mathbb{N}\to \mathbb{N}$ so that for every natural numbers $m,n$ :$f(n)+2mn+f(m)$ is a perfect square.