parmenides51 wrote:
Find all prime numbers $p$ such that $\frac{3^{p-1} - 1}{p}$ is a perfect square.
Easy one
Clearly $p=2$ is a solution, suppose that $p >2$, then $p-1=2a$ giving that
$$(3^a-1)(3^a+1) = 3^{p-1} = pC^2 $$Since $\gcd(3^a-1,3^a+1)=2$, then
$\textbf{Case.1}$
$$ 3^a-1 = 2px^2, 3^a+1 = 2y^2 $$which is absurd because $0 \equiv 3^a \equiv 2y^2 - 1 \equiv 1 \not\equiv 0 \pmod3$. $\blacksquare$
$\textbf{Case.2}$
$$ 3^a-1 = 2x^2, 3^a +1 = 2py^2 $$Clearly $a$ is even. Indeed, if $a$ was odd then $4 \mid 3^a + 1$ giving that $2 \mid y$ so $8 \mid 3^a +1$, a contradiction.
Let $a=2b$, then $(3^b - 1)(3^b+1)=2x^2$..
As previously, $\gcd(3^b-1,3^b+1)=2$ but $3^b +1 \neq 2r^2$, Thus $3^b +1 = r^2$ giving that
$$ \Rightarrow 3^b = (r-1)(r+1) $$So $r-1=3^h$ and $r+1 = 3^t$ giving $ 3^t - 3^h = 2$, and it is easy to see that $(t,h) =(1,0)$, hence $p=2a+1=4b+1 = 4(t+h)+1 =5$, we are done. $\blacksquare$