# Find all prime numbers $p$ such that $5^p+ 4p^4$ is a perfect square

Find all prime numbers $$p$$ such that $$5^p+ 4p^4$$ is a perfect square.

• $p=5$ is a solution. Did you really try? – Dietrich Burde Apr 20 at 16:36
• How hard did you search? $p=5$ works. – lulu Apr 20 at 16:36
• As a way to get started: Note that $5^p+4p^4=n^2\implies 5^p=(n-2p^2)(n+2p^2)$ so both of the factors on the right must be powers of $5$. – lulu Apr 20 at 16:38

## 1 Answer

$$5$$ is the only such prime. Note that if $$5^p+4p^4=n^2$$ Then $$5^p=(n+2p^2)(n-2p^2)$$ Each factor must be a power of $$5$$, hence the difference of the factors is a multiple of $$5$$ unless $$5^p=4p^2+1$$. If this is not the case, then this difference is $$4p^2$$ and a multiple of $$5$$, so $$p$$ is a multiple of $$5$$. Since it is prime, $$p=5$$.

Otherwise, since $$p^2>1$$ we have $$5p^2>5^p$$, so $$p^2>5^{p-1}$$. By induction we can prove that this entails that $$p<5$$, so this is impossible to satisfy given the conditions.

• What if one of the factors equals $\pm1$? – Servaes Apr 23 at 7:36
• @Serv It can't be $-1$, but it could be $1$. Let me think about that case. – Matt Samuel Apr 23 at 14:07
• @Serva See my edit. – Matt Samuel Apr 23 at 14:27