Find all prime numbers $p$ such that $\frac{2^{p-1}-1}{p}$ is a perfect square.

543
Given that $p$ must be an odd prime.
$$
\text { Let } \frac{2^{p-1}-1}{p}=x^{2}\left(x \in Z_{+}\right) \text {. }
$$

Then $\left(2^{\frac{p-1}{2}}+1\right)\left(2^{\frac{p-1}{2}}-1\right)=p x^{2}$.
Since $\left(2^{\frac{p-1}{2}}+1,2^{\frac{p-1}{2}}-1\right)=1$, there exist positive integers $a, b$, satisfying
$$
\left\{\begin{array}{l}
2^{\frac{p-1}{2}}+1=a^{2}, \\
2^{\frac{p-1}{2}}-1=p b^{2}
\end{array}\right.
$$

or $\left\{\begin{array}{l}2^{\frac{p-1}{2}}+1=p a^{2}, \\ 2^{\frac{p-1}{2}}-1=b^{2} .\end{array}\right.$
From equation set (1), it is easy to see that $a$ is an odd number and $a \geqslant 3$.
Then $2^{\frac{a-3}{2}}=\frac{a-1}{2} \cdot \frac{a+1}{2}$.
Since $\left(\frac{a-1}{2}, \frac{a+1}{2}\right)=1$, we have
$$
\frac{a-1}{2}=1 \Rightarrow a=3 \text {. }
$$

At this point, $p=7$. This is verified to be true.
From equation set (2),
$2^{\frac{p-1}{2}}=b^{2}+1 \Rightarrow b^{2}+1$ is even
$\Rightarrow b$ is odd $\Rightarrow b^{2} \equiv 1(\bmod 8)$
$\Rightarrow b^{2}+1 \equiv 2(\bmod 8)$.
At this point, $p=3$.
Thus, the required $p=3,7$.