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.