# $3^x + 4^y = 5^z$ [duplicate]

This is an advanced high-school problem.

Find all natural $x,y$, and $z$ such that $3^x + 4^y = 5^z$.

The only obvious solution I can see is $x=y=z=2$. Are there any other solutions?

## marked as duplicate by Zander, Joel Reyes Noche, Jonas Meyer, user223391, 2012ssohnMay 28 '15 at 2:54

• Can you show your work? We may correct it or help you reach a solution. – Rohinb97 May 27 '15 at 8:54
• Hint: A number raised to its power has its last digit repeated after every 4th power. $3^1=3,3^2=9,3^3=7,3^4=1(mod 10)$ – Rohinb97 May 27 '15 at 8:56
• @Rohinb97 Thanks for the hint. I had no idea how to approach this problem, I have never worked on anything like that before. – Vlad May 27 '15 at 8:57

First mod the whole thing by 3, then $1^y = 2^z$, so $z = 2z_2$ for some $z_2\in\mathbb{N}$. So $3^x = 5^{2z_2} - 2^{2y} = (5^{z_2} + 2^y)(5^{z_2} - 2^y)$.
If $5^{z_2} - 2^y\ne 1$, then by modding each factor by 3 we find that $z_2\ne y \mod 3$ and $z_2 = y \mod 3$, contradiction.
We can invoke Mihăilescu's theorem to find that $x = y = z = 2$.
Note $$2^z\equiv (3+2)^z=5^z=3^x+4^y\equiv 0+1=1\pmod 3$$
so $z$ is even number,let $z=2z_{1}$,then we have $$(5^{z_{1}}+2^y)(5^{z_{1}}-2^y)=3^x$$ so we have $$5^{z_{1}}+2^y=3^x,5^{z_{1}}-2^y=1$$ then we have $$(-1)^{z_{1}}+(-1)^y\equiv 0\pmod 3,(-1)^{z_{1}}-(-1)^y\equiv 1\pmod 3$$ so we have $z_{1}$ is odd,$y$ is even,let $y=2y_{1}$ we have $$(4+1)^{z_{1}}+4^{y_{1}}=(4-1)^x\Longrightarrow (-1)^x\equiv 1\pmod 4$$ so $x$ is also even.
if $y>2$, since $$5^{z_{1}}+2^y=3^x\Longrightarrow 5\equiv 1\pmod 8$$ that's not impossible.so $y=2\Longrightarrow z_{1}=1,z=2,x=2$\$