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.
 A: Hint: Show that $2a^2-1$ is divisible only by primes $\equiv 1,7\pmod 8$, whereas $b^2+2$ must have a prime divisor not of that form. You already did the latter part.
A: 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.
A: $b^2+2 \equiv 2,3,6 \pmod{8}$ because $b^2+2$ satisfying $b^2+2 \equiv 3 \pmod{8}$ gets an inverse under module condition. Otherwise, $b^2+2$ will be an even which contradict to the parity of $2a^2-1$
Notice that $3 ^{-1} \equiv 3 \pmod 8$.
And $3 \times 1 \equiv 3^{-1} \pmod 8$, $7 \times 3^{-1} \equiv 5 \pmod 8$ none of which equivalent to $0$.
Here is the contradiction.
