<s>[INST] Prove that $\frac{2a^2-1}{b^2+2}$ is not an integer 
Let $a$ and $b$ be integers. Prove that $\frac{2a^2-1}{b^2+2}$ is not an integer.

I determined that since $2a^2-1 \equiv 1,7 \pmod{8}$ we must have $b^2+2 \equiv 3 \pmod{8}$ in order for the fraction to be an integer. I didn't see how to find a contradiction from here.
 [/INST] Hint $\ $ If a prime $\,p\,$ divides  numerator and denominator then $\,{\rm mod}\ p\!:\ b^2\equiv -2,\,$ and $\, (2a)^2\equiv 2.\,$ Since both $\,2\,$ and $\,-2\,$ are squares mod $\,p\,$ it follows by reciprocity that $\,p\equiv 1\pmod 8.\,$ But $\,b^2+2\,$ must be divisible by a prime $\,q\not\equiv 1\pmod 8,\,$ else $\,{\rm mod}\ 8\!:\ b\equiv 1\,\Rightarrow\,b^2+2\equiv 3,\,$ contradiction. Since $\,q\,$ divides the denominator but not the numerator, the fraction is not an integer.
</s>