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 2 of 6: Reduce the numerator modulo the denominator
Detailed analysis
Modulo m^2+2 we have m^2≡−2. Substituting this into (m^2+a)^2+1 yields the displayed remainder. Thus the original integrality condition is equivalent to m^2+2 dividing (a−2)^2+1.