Prove that $24n+5$ can't be a perfect square with $n \in \Bbb Z^+$

201 Views Asked by At

Prove that $24n+5$ can't be a perfect square with $n \in \Bbb Z^+$

My try

I tried to prove it by contradiction:

Assume that $24n+5=a^2$ with $a\in \Bbb Z^+$

Then $24n+5$ is odd, so $a$ is odd too

Then $$n=\frac {a^2-5}{24}$$

So $a^2-5|24$

I saw that if $a^2-5|24$, then $a$ must have a remainder of 5 when is divided by 24.

Example: Let $a^2-5=24$, then $a^2=29$ and $29/24=1$ with remainder of 5.

Let $a^2-5=48$, then $a^2=53$ and $53/24=2$ with remainder of 5.

So the problem reduces to finding a perfect square that divided by $24$ gives a remainder of $5$. I tried by brute force with all $a\ge 7$ (because $a$ is odd, so i tried $7,9,$... till $25$) and they all give remainder of $1$ or $9$. I know this doesn't suffices that there isn't a perfect square that divided by 24 gives remainder of $5$, but i don't know how to continue. I'm thinking about modular arithmetic and congruency, but i don't see the way.

Any hints?, or atleast is my way is correct?.

Thanks.

5

There are 5 best solutions below

0
On BEST ANSWER

Assume for contradiction that $24n+5$ was a perfect square. Then for some $a\in\mathbb{Z}$, we have $24n+5=a^2$. Since $a$ is an integer then $a^2$ is an integer, thus $24n+5$ must be odd, meaning that $a^2$ is odd, therefore meaning that $a$ is also odd. So for some $k\in\mathbb{Z}$, $a=2k+1$ and thus $a^2 = 4k^2+4k+1$. And we have the equation $24n+5=4k^2+4k+1$. This implies that $6n+1=k^2+k$. But notice that $6n+1$ is always odd and $k^2+k$ is always even. A contradiction.

0
On

$a$ is odd so $a=2k+1$ and thus $$a^2=4k(k+1)+1\equiv 1(\mod 8).$$

2
On

Suppose numbers of the form $24n+5$ are perfect squares. Then

$$a^2-5|24\ \Rightarrow\ a^2\equiv5\bmod 24,$$ which means that $5$ is a quadratic residue modulo $24$. But the set of quadratic residues modulo $24$ are $\{0,1,4,9,12,16\}$. Contradiction.

Thus, numbers of the form $24n+5$ are not perfect squares.

1
On

Modulo $8$, the squares are $0,1,4$. But $24n + 5 \equiv 5 \pmod{8}$, so cannot be a square.

Ultimately this is the same as the other solutions here, but slightly slicker to write down (except zwim's, which appeared after this one and is way nicer).

0
On

$\begin{array}{c|cc} a & a^2\pmod 3\\\hline 0 & 0\\ 1 & 1\\ 2 & 1\end{array}\quad$ but $\quad24n+5\equiv 2\pmod 3\quad$ so it cannot be a square.