Problem

Source: APMO 2013, Problem 2

Tags: modular arithmetic, inequalities, quadratics, function, algebra, floor function, Hi



Determine all positive integers $n$ for which $\dfrac{n^2+1}{[\sqrt{n}]^2+2}$ is an integer. Here $[r]$ denotes the greatest integer less than or equal to $r$.