TITLE: What is prime power of this equation of p?
QUESTION [11 upvotes]: Let $p$ be a prime number, I think when $p^2+p+1=q^a$, where $q$ is a prime number, then $a=1$. But I can't prove it. Is it true?

REPLY [18 votes]: The equation
$$ \frac{x^k-1}{x-1}=y^m$$
is known as the Nagell-Ljunggren equation. It is conjectured that for $x\geq 2$, $y\geq 2$, $k\geq 3$, $m\geq 2$, the only solutions are 
$$ \frac{3^5-1}{3-1}=11^2,\qquad \frac{7^4-1}{7-1}=20^2,\qquad \frac{18^3-1}{18-1}=7^3.$$
For $3\mid k$, the equation was solved by Ljunggren (Norsk. Mat. Tidsskr. 25 (1943), 17-20). For more details see also here.
It follows that $p^2+p+1=q^a$ for any integers $p,q,a\geq 2$ implies $p=18$, $q=7$, $a=3$.