Let $x,y$ be two positive integers such that $x^2-1=y^p$ where $p$ is a prime. Find all possible $x,y,p$
I tried using Lifting the Exponent Lemma or considering the smallest prime that divides $x$ or that divides $y$ and tried solving. I think that $(x,y,p)=(3,2,3)$ is the only solution but there might be some more.
Instead of providing a full solution, may I get some hint at first? If I still can't solve, I'll post my methods I tried using the provided hint and then request for a full solution.
Here is a partial answer showing there are no solutions if $y$ is odd. I leave part of it in spoiler tags since the OP wanted hints.
We have $x^2 - 1 = y^p$ and so $(x + 1)(x - 1) = y^p$.
First assume that $y$ is odd.
We have $\gcd(x + 1, x - 1) \mid 2$, and since $y$ is odd, that means $x$ is even and thus $x \pm 1$ is odd. So they are coprime.
By the fact that $\mathbb{Z}$ is a UFD, this forces $x + 1 = m^p$ and $x - 1 = n^p$ for some positive integers $m, n$.