Problem

Source: Iran TST 2011 - Day 4 - Problem 3

Tags: function, pigeonhole principle, induction, modular arithmetic, number theory proposed, number theory



Suppose that $f : \mathbb{N} \rightarrow \mathbb{N}$ is a function for which the expression $af(a)+bf(b)+2ab$ for all $a,b \in \mathbb{N}$ is always a perfect square. Prove that $f(a)=a$ for all $a \in \mathbb{N}$.