Number theory proofs regarding perfect squares How do you prove that $3n^2-1$ is never a perfect square

Let $3n^2-1=b^2, \text{ for a } b \in \mathbb{Z}$
$$3n^2-1 \equiv -1 \pmod 3 \equiv 2 \pmod 3$$
$$b=3k \text{ or } b=3k+1 \text{ or } b=3k+2$$
Then:
$$b^2=9k \equiv 0 \pmod 3 \text{ or } b^2=3n+1 \equiv 1 \pmod 3 \text{ or } b=3n+1 \equiv 1 \pmod 3$$
We see that it cannot be $b^2 \equiv 2 \pmod 3$,so the equality $3n^2-1=b^2$ cannot be true.
Therefore, $3n^2-1$ is never a perfect square.
