Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please help me to prove that the equation $3^n + 4^m = 5^k$ where $n$, $m$, $k$ are positive integer numbers has only the solution $n=m=k=2$.

I know how to prove it for $n=m=k$.

If $3^x + 4^x = 5^x$ then $(3/4)^x + 1 = (5/4)^x$, and this equation has at most one solution since the function $(3/4)^x + 1$ decreases and the function $(5/4)^x$ increases for all real $x$. So the solution $x = 2$ is unique.

Thank you very much in advance!

share|cite|improve this question
Good observation on the $n=m=k$ solution. Maybe use the fact that $3,5$ are prime and/or relatively prime? (I don't know the answer; just making an observation.) – John Feb 3 '14 at 15:25
Another observation: looking at the powers $\pmod 5$, you can break it down into two cases: $4^{2s} + 3^{4t+2} \neq 5^k$ and $4^{2w+1} + 3^{4r+3} \neq 5^k$ – Michael Tong Feb 3 '14 at 15:31
Considering the equation modulo $3$, we see that $k$ would have to be even, and likewise, reducing modulo $4$, we see than $n$ would have to be even. – G Tony Jacobs Feb 3 '14 at 15:44
Judging modulo $4$, n has to be even. So $9^p+4^m=5^k$. Modulo $5$, this implies that p and m have opposite parity. – Lucian Feb 3 '14 at 15:58
So far, we have $9^p+4^m=25^q$. Reducing modulo $8$ tells us that $m>1$. Reducing instead modulo $13$, we obtain that $q$ is odd. – G Tony Jacobs Feb 3 '14 at 16:25

Considering the equation modulo 3 and 4 separately, we see that $2 | n \implies n = 2a$ and $2 | k \implies k = 2c$ for some positive integers $a, c$. Rewriting, we get

$$\begin{align} 3^{2a} + 4^m &= 5^{2c}\\ 2^{2m} &= (5^c)^2 - (3^a)^2\\ 2^{2m} &= (5^c + 3^a)(5^c - 3^a)\end{align}$$

We thus allow $5^c + 3^a = 2^y$ and $5^c - 3^a = 2^x$ for non-negative integers $x, y$ such that $x + y = 2m$. Summing both up, we get: $$2\cdot5^c = 2^x + 2^y$$ If $x = 0$, then $2\cdot5^c = 1 + 2^y\implies y = 0 \implies m = 0$. But the question states that $m > 0$, so the case where $x = 0$ is impossible $\implies x > 0 \implies y > 0$.

This allows us to divide throughout by $2$ to get: $$5^c = 2^{x - 1} + 2^{y - 1}$$ Taking both sides modulo $2$, we find that the above is impossible for $x-1 > 0$. Hence, $x - 1 = 0$, or $x = 1$. From this, we get: $$\begin{align}5^c = 1 + 2^{y - 1}\\ 5^c - 2^{y - 1} = 1\end{align}$$ This smells of Catalan's Conjecture (now promoted to a theorem), which implies (in this context) that either $c$ or $y - 1$ must be equal to $1$.

If $y - 1 = 1$, then $5^c - 2^1 = 1 \implies 5^c = 3$, which has no solution.

If $c = 1$, then $k = 2c = 2$ and $5 - 2^{y - 1} = 1 \implies 2^{y - 1} = 4 \implies y = 3$. But we deduced that $x = 1$, so by substituting back into the relation $x + y = 2m$, we get $m = 2$, which after substituting back into the original equation gives us directly $n = 2$.

We therefore conclude that there is only one solution, that is, $(n, m, k)$ = $(2, 2, 2)$.

Perhaps the above approach could somehow be used to solve the mess I made over here at this thread.

share|cite|improve this answer
I suspect the appeal to Catalan's theorem can be eliminated by considering the (multiplicative) order of $5$ mod $2^{y-1}$, which for most values of $y$ should make $c$ too large for equality. – Erick Wong Feb 3 '14 at 17:48
@ErickWong How would you do that? (Sorry, I'm rather poor with multiplicative orders). – Yiyuan Lee Feb 6 '14 at 13:50
Ok, let's see if this works. It's fairly well-known that for $k\ge 2$, $5$ is an "almost primitive root" mod $2^k$, in the sense that its multiplicative order is $2^{k-2}$ (iirc a standard induction should establish this). If $5^c = 1 + 2^{y-1}$ then $5^c \equiv 1 \pmod{2^{y-1}}$ and so (assuming $y \ge 3$), $c$ must be a multiple of $2^{y-3}$. But then $5^c$ will be far too large to equal $1 + 2^{y-1}$, unless $y$ is extremely small. – Erick Wong Feb 7 '14 at 0:03
Also, my sincere apologies to Mihăilescu for accidentally calling it "Catalan's theorem"! – Erick Wong Feb 7 '14 at 0:05

Reducing the equation mod $3$ shows that $k$ must be even, and reducing mod $4$ shows the same for $n$, so let's rewrite the whole thing as


and show that $(n,m,k)=(1,2,1)$ is the only solution in positive integers.



implies $5^k-3^n=2^a$ and $5^k+3^n=2^b$ with $a\lt b=2m-a$. Subtracting these gives


which implies $a=1$ and $3^n=2^{b-a}-1$. It remains to show that the only positive power of $3$ of the form $2^u-1$ is $3^1=2^2-1$.

If $3$ divides $2^u-1$, then $u$ must be even, so let $u=2v$. In that case, $2^u-1=(2^v-1)(2^v+1)$. In order for $3$ to divide $2^v+1$, $v$ must be odd. But if $v$ is odd then $2^v-1$ is not divisible by $3$, so the only way it can be a power of $3$ is if it's equal to $1$, which implies $v=1$, which is exactly what we need.

Added later: One might alternatively rewrite the (modified) equation as


which implies $5^k-2^m=3^a$ and $5^k+2^m=3^b$ with $a\lt b=2n-a$. In this case subtracting gives


which implies $a=0$, so that $5^k-2^m=1$, or $5^k=2^m+1$. This leads to $3^{2n}=2^{m+1}+1$, or $2^{m+1}=(3^n-1)(3^n+1)$. As before, we must have $3^n-1=2^a$ and $3^n+1=2^b$ with $a\lt b$, but this time subtracting gives $2=2^a(2^{b-1}-1)$, which forces $a=1$, hence $n=1$.

Note, the only role of $5$ in either approach is to be congruent to $2$ mod $3$ and $1$ mod $4$ (so that we can replace $n$ and $k$ with $2n$ and $2k$), so the same proof works with anything congruent to $5$ mod $12$, e.g., $17$, $29$, $41$, etc. The only difference is that in these cases the final conclusion is that there are no solutions: Once you've got $n=1$ and $m=2$ on the left hand side, you can only have $5^2$ on the right.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.