Determine all triples $(p, q, r)$ of prime numbers for which $p^q + p^r$ is a perfect square.
Problem
Source: 2019 Dürer Math Competition Finals E1.3
Tags: Perfect Square, number theory
EmilXM
28.11.2020 15:24
WLOG $q\geq r$. Let $a^2=p^q+p^r=p^r(p^{q-r}+1)$. Since $gcd(p^r,p^{q-r}+1)=1$ when $q \neq r$, we get $r=2$. So we want to find solutions to the equation $p^{q-2}=(b-1)(b+1)$. Easy case working gives us only solution is $(p,q,r)=(3,3,2)$. If $q=r$ we get $a^2=2p^r$ which gives solution $(p,q,r)=(2,r,r)$. So all solutions are $\boxed{(p,q,r)=(3,3,2);(3,2,3);(2,r,r)}$
@below Oops, you are right.
hyay
28.11.2020 15:36
EmilXM wrote:
SolutionWLOG $q\geq r$. Let $a^2=p^q+p^r=p^r(p^{q-r}+1)$. Since $gcd(p^r,p^{r-q})=1$, we get $r=2$. So we want to find solutions to the equation $p^{q-2}=(b-1)(b+1)$. Easy case working gives us only solution is $\boxed{(p,q,r)=(3,3,2)}$
You forgot to consider the case when $q = r$.
If $q = r$ then $2p^q$ is a perfect square, therefore $p = 2$ and $q$ is odd, i.e. $q \neq 2$. Now assume, WLOG, that $q > r$. Then $p^r(p^{q-r} + 1)$ is a perfect square. Since $p \nmid p^{q-r} + 1$, $r$ must be even, so $r = 2$. Furthermore, $p^{q-2} = x^2 - 1 = (x + 1)(x - 1)$ for some positive integer $x$, which means $x + 1 = p^a$ and $x - 1 = p^b$ for some nonnegative integers $a, b$. Thus we get $p^a - p^b = p^b(p^{a-b} - 1) = 2$, which will give us $(p, a, b) = (2, 2, 1)$ and $(3, 1, 0)$. Substituting, we get $(p, q, r) = (3, 3, 2)$ as our only solution. Hence, the only solutions are $(p, q, r) = (2, k, k), (3, 3, 2), (3, 2, 3)$, where $k$ is any odd prime.