Solve in prime numbers the equation $p^q+q^r=r^p$

366 Views Asked by At

Find all triples of prime numbers $(p,q,r)$ such that $$p^q+q^r=r^p.$$

I proved that when $r=2$, the equation becomes $$p^q+q^2=2^p.$$ Then I tried to use reciprocity laws and Fermat's little theorem. I could prove that $p\equiv 7\pmod 8$ and that $p>q$.

The equation appeared in some olympiad . They asked to prove that $r=2$. So I am trying to find at least one triple.

2

There are 2 best solutions below

7
On

It is clear that precisely one of $p$, $q$ and $r$ must equal $2$. We'll first show that in fact $r=2$:


Observation 1: $r=2$.

If $q=2$ then reducing mod $3$ shows that $$p^2+2\equiv r^p\pmod{3},$$ so either $p=3$ or $r=3$. Both are easily verified to be impossible.

If $p=2$ then $$2^q+q^r=r^2,$$ but for all primes $q,r>2$ we have $q^r>r^2$, a contradiction.


This leaves us with finding odd primes $p$ andd $q$ satisfying $$p^q+q^2=2^p.$$ We first make a few more simple observations.


Observation 2: $q^2\equiv2\pmod{p}$.

By Fermat's little theorem $$q^2\equiv p^q+q^2\equiv2^p\equiv2\pmod{p}.$$

Observation 3: $q<p$.

As $p>2$ we have $2^q<p^q+q^2=2^p$, so $q<p$.


The problem can be rephrased in the number ring $\Bbb{Z}[\sqrt{2}]$. This is a unique factorization domain with unit group $\{\pm1\}$. Setting $m:=\frac{p-1}{2}$ we can rewrite the equation above as $$p^q=-(q+2^m\sqrt{2})(q-2^m\sqrt{2}).$$ The greatest common divisor of the two factors on the right hand side divides both $2q$ and $p^q$. Because $p$ and $q$ are distinct, these two factors are coprime and so both are $q$-th powers in $\Bbb{Z}[\sqrt{2}]$. Let $a,b\in\Bbb{Z}$ be such that $$q+2^m\sqrt{2}=(a+b\sqrt{2})^q.$$ Then $q-2^m\sqrt{2}=(a-b\sqrt{2})^q$ and hence $$p^q=-(a+b\sqrt{2})^q(a-b\sqrt{2})^q=(2b^2-a^2)^q,$$ which shows that $p=2b^2-a^2$.


Observation 4: $a=\pm q$ and $b\mid2^m$. (Thanks to barto's comment)

Set $\alpha:=a+b\sqrt{2}$ and $\bar{\alpha}:=a-b\sqrt{2}$. Because $$(\alpha+\bar{\alpha})\mid(\alpha^2+\bar{\alpha}^q)\qquad\text{ and } \qquad(\alpha-\bar{\alpha})\mid(\alpha^2-\bar{\alpha}^q),$$ we see that $2a\mid2q$ and $2b\sqrt{2}\mid2^{m+1}\sqrt{2}$. The binomial expansion $$q+2^m\sqrt{2}=(a+b\sqrt{2})^q,$$ shows that $q\mid a^q$, and hence that $q\mid a$ so $a=\pm q$.

Observation 5: $b=\pm1$.

By observation 3 we have $a^2=q^2<p^2$, and so $$p=2b^2-a^2>2b^2-p^2.$$ Because $p>q>2$ we have $p\geq5$ and so $b^2<\frac{p^2+p}{2}\leq(p-1)^2$. Also, by observation 2 $$p=2b^2-a^2=2b^2-q^2\equiv2b^2-2\pmod{p},$$ and so $b^2\equiv1\pmod{p}$. This means $b=\pm1$.


We have $a=\pm q$ and $b=\pm1$ and so $$p=2b^2-a^2=2-q^2<0,$$ a contradiction.

2
On

So $$p^q+q^2=2^p \qquad(*)$$ It is easy to show that $\boxed{p\gt q}$ or just look at the graph of the function $x ^ y + y ^ 2 = 2 ^ x$ for $x,y\gt1$.

If $p=4n+1$ then from $(*)$, $$q=4m\pm1\Rightarrow4N+1+16m^2\pm8m+1=2N+8m^2\pm4m+1=2^{p-1}\space\text{ absurde}.$$ Then $p$ must be of the form $\boxed{p=4n-1}$.

Put $p=an-1$ where $n$ is odd and $a=2^r,\space r\ge 2$. $$(an-1)^q=(an)^q-1+\sum_{k=1}^{q-1}(\pm1)^k\binom qk(an)^{q-k}$$ $$(an-1)^q=(an)^q-1+an\left(\sum_{k=1}^{q-2}(\pm1)^k\binom qk(an)^{q-k-1}\right)+anq$$ For $\boxed{q\equiv\pm1\pmod4}$ put $q=bm\pm1$ where $m$ is odd and $b=2^s,\space s\ge 2$.

The equation $(*)$ becomes $$(an)^q+an\left(\sum_{k=1}^{q-2}(\pm1)^k\binom qk(an)^{q-k-1}\right)+anq+(bm)^2\pm2bm=2^p\qquad(**)$$ This last condition, , implies

Note that the sum $\left(\sum\right)$ is even.

Now

►if $a\le b$ (i.e. $2^r\le2^s$) then dividing by $a$ we are done because $nq$ is odd.

►if $a\gt b$ (i.e. $\dfrac {a}{2b}=2^{r-s-1}\ge1$) then dividing by $2b$ we are done for all $p,q$ such that $r\gt {s+1}$ because $m$ is odd.

It remains the cases for which $r=s+1$, in other words and taking into account the above $$p=2^{s+1}n-1,\space q=2^sm\pm1\space n,m \space \text{ odds},\space \text {with }p\gt q$$ This last condition, $p\gt q$ , implies $$2^{s+1}n-1\gt2^sm\pm1\Rightarrow\begin{cases}2^sn\gt2^{s-1}m+1\\2n\gt m\end{cases}$$ Thus it remains to study the equation where $p=2^{s+1}n-1,\space q=2^sm\pm1\space n,m \space \text{ odds},\space \text {with }p\gt q$ both odd primes. $$\boxed{\displaystyle(2^{s+1}n-1)^{2^sm\pm1}+(2^sm\pm1)^2=2^{2^{s+1}n-1}}$$

I will return to the possible proof of this last part. If someone wants to end this problem by proving the apparently probable impossibility of solution, let it go forward. In particular if @Servaes wants to finish his very interesting partial answer.