Prove that $3a^2-1$ is never a perfect square when $a$ is an integer 
Prove that $3a^2-1$ is never a perfect square when $a$ is an integer.

I'm not sure how to go about this proof or what form of an integer to use. I know an integer can be represented using

*

*$2k$, $2k+1$,  or


*$3k$, $3k+1$, $3k+2$, or


*$4k$, $4k+1$, $4k+2$, $4k+3$...
but how do I know which form to use for this problem?
 A: Hint $ $ If not, let $\,n\,$ be the $\rm\color{#0a0}{least}$ natural with $\,\color{#c00}{n^2 =3k-1}\,$ for some $\,k\in \Bbb Z.\,$ Clearly $\,n\neq 1,2,3\,$ so $\,n\!-\!3\,$ is a $\rm\color{#0a0}{smaller}$ such natural since $\,(n\!-\!3)^2\! = \color{#c00}{n^2}\!-\!6n\!+\!9 = \color{#c00}3(\color{#c00}k\!-\!2n\!+\!3)\color{#c00}{-1},\,$ $\rm\color{#0a0}{contradiction}$.
Note $ $ I use this method since you wrote modular arithmetic is not known. This form of induction is known as Fermat's method of infinite descent, or minimal counterexample, or minimal criminal. The key idea is that $\,n^2\,$ and $\,(n−3)^2$ leave the same remainder on division by $\,3\,$ so to test the statement on all integers it suffices to test it on the least possible remainders $\,0,1,2\,$ (or $1,2,3$). The innate arithmetical structure will become clearer when you learn modular arithmetic.
A: Hint: You can use modulo $3$ or modulo $4$. A square number can give only $0$ and $1$ as remainder modulo $4$.

 If $a\equiv 0\pmod4$ (meaning $a$ gives remainder $0$) then $3a^2-1\equiv3\cdot0-1\equiv -1\equiv 3 \pmod4$. 
 If $a\equiv 1\pmod4$, then $3a^2-1\equiv3\cdot1-1=2\pmod4$.

A: there are two ways to prove that $3a^2-1$ is never a perfect square. first we can prove it by contrapositive and secondly we can prove it by contradiction. So im going to prove by contradiction.
Assume that $3a^2-1$ is a perfect square, Then that means $3a^2-1$ can be written in form of $3k$ or $3k+1$.
i.e. $3a^2-1=3k$ or $3a^2-1=3k+1$
If $3a^2-1=3k$ then $3(a^2-k)=1$, which is a contradiction since $3$ does NOT divide $1$.
If $3a^2-1=3k+1$ the $3(a^2-k)=2$, which is also a contradiction since $3$ does NOT divide $2$.
In conclusion $3a^2-1$ is or will never be a perfect square. 
                        Q.E.D
A: Without mods, use parity.
Focus on

$$
3a^2 - 1 = p^2.
$$

So we have two options:
Case 1. $a$ is odd and $p$ is even

$$
3 ( 2k + 1 )^2 - 1 = 4 \ell^2.
$$

Thus

$$
6 k^2 + 6 k + 1 = 2\ell^2.
$$

Which is a contradiction as we get odd = even.
Case 2. $a$ is even and $p$ is odd.

$$
12 k^2 - 1 = ( 2 \ell + 1 )^2.
$$

Thus

$$
6 k^2 = 2 \ell^2 + 2 \ell + 1.
$$

Which is a contradiction as we get even = odd.
So there are no integer solutions.
A: You can prove it using modular arithmetic:

$n$ is a perfect square $\implies[n\equiv0\pmod4]\vee[n\equiv1\pmod4]$:


*

*$k\equiv0\pmod4 \implies k^2\equiv0^2\equiv\color\green0\pmod4$

*$k\equiv1\pmod4 \implies k^2\equiv1^2\equiv\color\green1\pmod4$

*$k\equiv2\pmod4 \implies k^2\equiv2^2\equiv\color\green0\pmod4$

*$k\equiv3\pmod4 \implies k^2\equiv3^2\equiv\color\green1\pmod4$



$a$ is an integer $\implies[3a^2-1\not\equiv0\pmod4]\wedge[3a^2-1\not\equiv1\pmod4]$:


*

*$a\equiv0\pmod4 \implies 3a^2-1\equiv3\cdot0^2-1\equiv\color\red3\pmod4$

*$a\equiv1\pmod4 \implies 3a^2-1\equiv3\cdot1^2-1\equiv\color\red2\pmod4$

*$a\equiv2\pmod4 \implies 3a^2-1\equiv3\cdot2^2-1\equiv\color\red3\pmod4$

*$a\equiv3\pmod4 \implies 3a^2-1\equiv3\cdot3^2-1\equiv\color\red2\pmod4$

