<s>[INST] How to solve $p^{2a+1}+p^a+1=b^2$ in integers? For prime number $p$ and positive integers $a$ and $b$ solve the following equation 
$$p^{2a+1}+p^a+1=b^2$$
Can you give me a hint for starting this problem?
 [/INST] Hint
$$p^a(p^{a+1}+1)=b^2-1=(b-1)(b+1)$$
Hint 2 $gcd(b-1,b+1)=1$ or $2$. If $p \neq 2$ then $p^a$ must divide either $b-1$ or $b+1$.
Hint 3 
If $b+1=kp^{a}$ then $b-1=\frac{p^{a+1}+1}{k}$. Then 
$$kp^a-\frac{p^{a+1}+1}{k}=2 \\
k^2p^a-p^{a+1}-1=2k \\ 
k^2p^a-p^{a+1}=2k+1 \\ 
$$
This means that $p |2k+1$. 
Also, $b+1=kp^{a}$ and $b-1=\frac{p^{a+1}+1}{k}$ imply that $1 < k<p$.
There is only one possibility.
The case $b-1=kp^{a}$ then $b+1=\frac{p^{a+1}+1}{k}$, is almost identic, you just get a sign changed.
Lats, the case $p=2$ is easy to tackle separately.
</s>