<s>[INST] $5^x - y^2 = 4$ Diophantine Equation I wrote a Diophantine equation and tried solving it. Then I got stuck at a stage of the solution.
Problem: Find all $(x,y)$ positive integer pairs that satisfy the equation $5^x - y^2=4$.
My Partial Solution: If $x$ is an even number then $x=2n\quad$ ($n \geq 1$ an integer). Therefore
$$ (5^n - y)(5^n + y) = 4$$
and we can write
\begin{equation*}
\left\{
\begin{split}
 5^x-y & = 1  \\
 5^x + y & = 4
\end{split}
\right.
\end{equation*}
Thus, $2\cdot 5^x = 5$ and there is no positive integer solution in this case.
If $x$ is an odd number,
$\bullet$ For $x=1$;  $\quad 5^1 -y^2=4 \implies y=1$.
$\bullet$ For $x=3$;  $\quad 5^3 -y^2=4 \implies y=11$.
$\bullet$ For $x\geq 5$; I thought of finding a contradiction using modular arithmetic. For example; $x=2k + 3 , \quad$ ($k\geq 1 $ an integer) $125\cdot 25^k - y^2 = 4$. In $\mod 24$,
$$5 - y^2 \equiv 4 \pmod{24}$$
But this is not a contradiction. So, I failed. How can I tell if the equation has a solution for $x>3$ or not? Thanks for your interest.
 [/INST] $$5^{x} - y^2 = 4\tag{1}$$
We take the three cases $x=3a, x=3a+1$, and $x=3a+2.$
The problem can be reduced to finding the integer points on elliptic curves as follows.
$\bullet\ x=3a$
Let $X=5^{a}$, then we get
$y^2 =X^3 - 4.$
According to LMFDB, this elliptic curve has integral solutions $(X,y)=(2,\pm 2), (5,\pm 11).$
From $(5,\pm 11),$ we get $(x,y)=(3,11).$
$\bullet\ x=3a+1$
Let $X=5\cdot5^{a}, Y=5y$, then we get
$Y^2 =X^3 - 100.$
This elliptic curve has integral solutions $(X,Y)=(5,\pm 5),(10,\pm 30),(34,\pm 198).$
From $(5,\pm 5)$, we get $(x,y)=(1,1).$
$\bullet\ x=3a+2$
Let $X=25\cdot5^{a}, Y=25y$, then we get
$Y^2 =X^3 - 2500.$
This elliptic curve has integral solution $(X,Y)=(50,\pm 350).$
We get no solution $(x,y).$
Hence there are only integral solutions $(x,y)=(1,1),(3,11).$
</s>