SolFeb28

Claim: There is only one solution to q^2 + q + 1 = p^n + p^{n-1} + \cdots + p + 1 for p,q primes, n > 2 even.

Proof: (Due to HiLander) Suppose (p,q,n) satisfies the claim. Since n is even, n = 2k for some k, and since n > 2, we have k > 1 and p \ne q. Subtracting 1 from both sides of the formual, we factor both sides:

q(q+1)= p(p^{n-1} + p^{n-2} + \cdots + 1) =  p\left(\frac{p^n - 1}{p-1}\right) = \left(\frac{p}{p-1}\right) (p^k-1)(p^k+1)

Suppose first that q \le p^k - 1. Then

q(q+1) < (p^k-1)(p^k + 1) < \left(\frac{p}{p-1}\right)(p^k-1)(p^k+1),

a contradiction.

Now suppose q > pk + 1. Since q is prime, and we know q \nmid p and q \nmid (p^k+1), we must have q \mid \frac{p^k-1}{p-1} < p^k, another contradiction.

Therefore q \in \{p^k,p^k+1\}. If q = pk, then k = 1 since both are prime, so instead we have q = pk + 1. But that means

q+1 = \frac{p}{p-1}(p^k-1) = (p^k-1) + \frac{p^k-1}{p-1} = (q - 2) + (1 + \cdots + p^{k-1}),

and so

3=1 + p + \cdots p^{k-1}.

Since p \ge 2 and k \ge 2, this implies both hold at equality, else the RHS of our last equation is too large. From this, we get n = 2k = 4, and q = pk + 1 = 5, so (2,5,4) is the only solution (p,q,n). \square