MathLabs

Problem 2

Determine all positive integers n for which (n^2+1)/(floor(sqrt(n))^2+2) is an integer. Here floor(r) denotes the greatest integer less than or equal to r.
Step 6 of 6: Exclude k=3
k=3:(a−2)2+1≡1,2(mod3),3(m2+2)≡0(mod3).k=3:\quad(a-2)^2+1\equiv1,2\pmod3,\quad3(m^2+2)\equiv0\pmod3.
Detailed analysis

A square modulo 3 is 0 or 1, so (a−2)^2+1 is 1 or 2 modulo 3, whereas 3(m^2+2) is 0 modulo 3. This is impossible, so no positive n satisfies the problem.