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?

Hint  If not, let $\,n\,$ be the least natural such that $\,\color{#c00}{n^2 =3k-1}\,$ for some $\,k\in \Bbb Z.\,$ Since $\,n\neq 1,2,3\,$ $\,n\!-\!3\,$ is a smaller such natural since $\,(n\!-\!3)^2\! = \color{#c00}{n^2}\!-\!6n\!+\!9 = \color{#c00}3(\color{#c00}k\!-\!2n\!+\!3)\color{#c00}{-1},\,$ contradiction.

• I chose this since you say you do not know modular arithmetic. 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. – Bill Dubuque Feb 27 '14 at 1:53
• Perusing this thread I was a bit worried that no answer is mentioning the solution based on $-1$ not being a QR modulo $3$. Thank you :-) – Jyrki Lahtonen Sep 2 '15 at 6:42

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$.

• I did not learn mods yet sorry – Lil Feb 27 '14 at 1:21
• @Lil In other words, a square number can only be represented as $4k$ or $4k+1$ – Mike Feb 27 '14 at 1:25
• can it be represented as 3k or 3k+1 or 3k+2? – Lil Feb 27 '14 at 1:25
• Then, first write $a=4k,\ 4k\pm1$ or $a=4k+2$, and prove my first statement. Then write $a^2=4s$ or $a^2=4s+1$ to go on. – Berci Feb 27 '14 at 1:25
• It takes fewer steps to work mod $3$. – André Nicolas Feb 27 '14 at 1:27

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

• You may need to include that a square can be written as $3k$ or $3k+1$. – johannesvalks Aug 12 '15 at 13:03

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.

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$
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/692014/prove-that-3a2-1-is-never-a-perfect-square-when-a-is-an-integer", "fetch_time": 1571698208000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2019-43/segments/1570987795253.70/warc/CC-MAIN-20191021221245-20191022004745-00538.warc.gz", "warc_record_offset": 611642875, "warc_record_length": 34979, "token_count": 1649, "char_count": 4075, "score": 4.15625, "int_score": 4, "crawl": "CC-MAIN-2019-43", "snapshot_type": "latest", "language": "en", "language_score": 0.8081545233726501, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00027-of-00064.parquet"}