<s>[INST] Find all primes $p,q$ and even $n > 2$ such that $p^n+p^{n-1}+\cdots+1 = q^2+q+1$ 
Find all primes $p,q$ and even $n > 2$ such that $p^n+p^{n-1}+\cdots+1 = q^2+q+1$.

Attempt
The first thing I would do is simplify the geometric series to $\dfrac{p^{n+1}-1}{p-1} = q^2+q+1$. I was thinking from here we could use a modular arithmetic argument, perhaps using FLT. It is unclear to me though how to proceed since we are working with two different primes.
 [/INST] Suppose that $n=2k$ for some integer $k>1$.  Then we have $q(q+1)=p\left(\frac{p^{2k}-1}{p-1}\right)$.  As $k>1$, $p\neq q$, so that $q$ divides $p^{2k}-1=\left(p^k+1\right)\left(p^k-1\right)$.  That is, $q$ divides either $p^k-1$ or $p^k+1$.  In any case, $q\leq p^k+1$.  Therefore, $$p^{2k}+p^{2k-1}+2< p^{2k}+p^{2k-1}+\ldots+p=q^2+q\leq \left(p^k+1\right)^2+\left(p^k+1\right)=p^{2k}+3p^k+2\,.$$
Ergo, $p^{2k-1}<3p^k$, or $p^{k-1}<3$.  Consequently, $k=2$ and $p=2$.  Hence, the only solution $(p,q,n)$ to $p^n+p^{n-1}+\ldots+p+1=q^2+q+1$ with $p,q,n\in\mathbb{N}$ such that $p$ and $q$ are primes and that $n>2$ is even is $(p,q,n)=(2,5,4)$.
In fact, if $n$ is allowed to be an odd integer greater than $2$, then it follows that $p=2$ (otherwise $p^n+p^{n-1}+\ldots+p+1$ is even, but $q^2+q+1$ is odd).  That is, we are looking for a prime $q$ such that $q^2+q=2^{n+1}-2$, or $(2q+1)^2=2^{n+3}-7$.  As $n$ is odd, $n+3$ is even.  That is, $$\left(2^{\frac{n+3}{2}}-2q-1\right)\left(2^{\frac{n+3}{2}}+2q+1\right)=7\,.$$  Hence, $2^{\frac{n+3}{2}}-2q-1=1$ and $2^{\frac{n+3}{2}}+2q+1=7$.  Consequently, $2^{\frac{n+3}{2}}\leq 6<2^3$.  Thus, $n<3$, which is a contradiction.
In conclusion, the only solution $(p,q,n)\in\mathbb{N}^3$ to $p^n+p^{n-1}+\ldots+p+1=q^2+q+1$ with $p$ and $q$ being prime is $(p,q,n)=(2,5,4)$.
</s>