Problem

Source: Canadian mathematical olympiad 2015

Tags: algebra, functional equation, function



Let $\mathbb{N} = \{1, 2, 3, \ldots\}$ be the set of positive integers. Find all functions $f$, defined on $\mathbb{N}$ and taking values in $\mathbb{N}$, such that $(n-1)^2< f(n)f(f(n)) < n^2+n$ for every positive integer $n$.