Find all positive integer solutions $ x, y, z$ of the equation $ 3^x + 4^y = 5^z.$
Problem
Source: IMO ShortList 1991, Problem 17 (HKG 4)
Tags: modular arithmetic, algebra, number theory, equation, IMO Shortlist
15.08.2008 20:33
16.08.2008 00:56
another way: cheking by moduls $ 3$ and $ 4$ we conclude that $ x$ and $ z$ are even therefore $ x=2a$ and $ z=2b$ now we have $ 4^y=(5^b)^2-(3^a)^2=(5^b-3^a)(5^b+3^a)$ and consequently $ (5^b-3^a)$ and $ (5^b+3^a)$ are obviously both even but not both devisable by $ 4$ we can conclude one of these two numbers equals $ 2$ and therefore the only possibility is $ 5^b-3^a=2$ leading to the unique solution of $ (x,y,z)=(2,2,2)$
18.07.2011 19:10
Sorry to revive, but how can you prove the only solution to $5^a-3^b=2$ is $(a,b)=1$?
18.07.2011 22:25
Supose $a>1$ , it's easy to see which $b$ is odd then by hensel's lemma $v_2(a)=v_2(b)$ then $a$ is odd. Let $p$ the less prime number such that $p|5^a-1$ and let $d$ the order of 5 module $p$, then $d|\gcd(p,a-1)=1$ because $2\nmid a$. Contradiction, then $b=1$ and the map $x\mapsto 3^x$ in growing it's conclude that the only solution is $(a,b)=(1,1)$
19.07.2011 01:51
Once we get $ 4^y=(5^b)^2-(3^a)^2=(5^b-3^a)(5^b+3^a)$, it follows $5^b-3^a = 2^{\alpha}$ and $5^b+3^a = 2^{\beta}$, with $\alpha+\beta = 2y$. So $5^b = 2^{\beta-1} + 2^{\alpha-1}$, $3^a = 2^{\beta-1} - 2^{\alpha-1}$. Therefore we must have $\alpha=1$, and now the equation $3^a = 2^{\beta-1} - 1$ is known (and easy to prove) it has as only solution $\beta = 2$, $a=0$ or $\beta = 3$, $a=1$; the only working for $5^b = 2^{\beta-1} + 1$ is the latter, for which $b=1$.
19.07.2011 07:27
snw wrote: Supose $a>1$ , it's easy to see which $b$ is odd then by hensel's lemma $v_2(a)=v_2(b)$ then $a$ is odd. Let $p$ the less prime number such that $p|5^a-1$ and let $d$ the order of 5 module $p$, then $d|\gcd(p,a-1)=1$ because $2\nmid a$. Contradiction, then $b=1$ and the map $x\mapsto 3^x$ in growing it's conclude that the only solution is $(a,b)=(1,1)$ Where do you show that $p\not | (a-1)$?
19.07.2011 18:31
me@home wrote: snw wrote: Supose $a>1$ , it's easy to see which $b$ is odd then by hensel's lemma $v_2(a)=v_2(b)$ then $a$ is odd. Let $p$ the less prime number such that $p|5^a-1$ and let $d$ the order of 5 module $p$, then $d|\gcd(p,a-1)=1$ because $2\nmid a$. Contradiction, then $b=1$ and the map $x\mapsto 3^x$ in growing it's conclude that the only solution is $(a,b)=(1,1)$ Where do you show that $p\not | (a-1)$? it's wrong, is $d|\gcd(p-1,a)$
20.07.2011 09:59
me@home wrote: snw wrote: Supose $a>1$ , it's easy to see which $b$ is odd then by hensel's lemma $v_2(a)=v_2(b)$ then $a$ is odd. Let $p$ the less prime number such that $p|5^a-1$ and let $d$ the order of 5 module $p$, then $d|\gcd(p,a-1)=1$ because $2\nmid a$. Contradiction, then $b=1$ and the map $x\mapsto 3^x$ in growing it's conclude that the only solution is $(a,b)=(1,1)$ Where do you show that $p\not | (a-1)$? In fact it was a typo. It would be $\gcd(p-1,a)$ and he meant $p$ to be the smallest prime factor of $5^a-1$, as bolded and so no primes less than $p$ can't be in $a$. Thus $\gcd(p-1,a)=1$. No fact of $p\not|a-1$
02.01.2014 17:52
orl wrote: Find all positive integer solutions $ x, y, z$ of the equation $ 3^x + 4^y = 5^z.$ Reducing modulo 3 gives $1\equiv 2^z$, so $z=2z_1$. Reducing modulo 4 gives $(-1)^x\equiv 1$, so $x=2x_1$. Hence by difference of squares $4^y=(5^{z_1}-3^{x_1})(5^{z_1}+3^{x_1})$. Now $LHS$ is a power of $2$ so $5^{z_1}-3^{x_1}=2^a$ and $5^{z_1}+3^{x_1}=2^b$ with obviously $a<b$. Adding we get $2\cdot 5^{z_1}=2^a(2^{b-a}+1)$, so $a=1$. Subtracting and using $a=1$ we obtain $5^{z_1}-1=2^{b-1}$, so $4(5^{z_1-1}+5^{z_1-2}+\cdots +5+1)=2^{b-1}$, hence $b=3$. So $5^{z_1}+3^{x_1}=8\Rightarrow (z_1,x_1)=(1,1)$, and $2y=a+b=4\Rightarrow y=2$. It follows after reverse substituting for $z=2z_1$ and $x=2x_1$ that $x=y=z=2$ is the only solution: $3^2+4^2=5^2$.
22.09.2019 13:50
Looks like this problem was proposed long before 1991. Here it is at the second Romanian TST from 1979:
Attachments:

22.09.2019 16:30
We can also use Fermat's theorem once we get X=y to conclude (X,y) belongs to(2,2)
16.04.2020 09:28
cosinator wrote:
How do you now that n is 0,or 1 please explain more i don't understand.
16.04.2020 10:33
bumpppppppp
24.06.2021 02:12
orl wrote: Find all positive integer solutions $ x, y, z$ of the equation $ 3^x + 4^y = 5^z.$ Cute diophane :3. Obviously $y>1$ becuase for $y=1$ there is no sol. Claim 1: $x$ and $z$ are even. Proof: Consider using the modulo 3 on the following diophane: $$3^x+4^y \equiv 5^z \pmod 3 \implies (-1)^z \equiv 1 \pmod 3 \implies z \; \text{even}$$Now consider using modulo 4 on the folllowing diophane: $$3^x+4^y \equiv 5^z \pmod 4 \implies (-1)^x \equiv 1 \pmod 4 \implies x \; \text{even}$$From here we will set $x=2m$ and $z=2n$ so the given diophane becomes to: $$9^m+4^y=25^n$$Claim 2: $5^n=3^m+2$ is true. Proof: Factor $25^n-9^m$ and use that $y>1$, note that $4^y$ is a multiple of $16$ so: $$4^y=(5^n+3^m)(5^n-3^m) \implies 5^n-3^m=2 \; \text{becuase} \; 5^n-3^m \not\equiv 0 \pmod 4$$Replace $25^n=9^m+4 \cdot 3^m+4$ on the given diophane to get: $$4^{y-1}=3^m+1$$Claim 3: The only sol is $(2,2,2)$ Proof: Put on both sides of the equation $v_3$ and then by LTE: $$v_3(4^{y-1}-1)=1+v_3(y-1)=m \implies m-1=v_3(y-1) \implies y=3^{m-1} \cdot a+1 \; \text{where} \; a \not\equiv 0 \pmod 3$$Case 1: $y=4$ From here we can see that $a=1$ and $m=2$ so $x=4$. Replacing on the diophane we get: $$81+256=337=5^z \; \implies \; \text{contradiction!!}$$Case 2: $y \ne 4$ Since $y \ne 4$ we can use Zsigmondy to get that $4^{y-1}-1$ has a prime factor such that $p \ne 3$. Assume that $m>1$. And now divide by $3$ both sides and use modulo p: $$3^{m-1}=\frac{4^{y-1}-1}{3} \equiv 0 \pmod p \implies \; \text{contradiction!!}$$So we have that $m=1$ and this implies $x=2$ and $y=2$. Replace this on the initial diophane: $$3^2+4^2=5^z \implies 25=5^z \implies z=2$$So the only solution is $(x,y,z)=(2,2,2)$. Thus we are done Note: I think there is a trivial way to do this, i think using many powerful theorems for an easy problem is bad.
04.07.2021 17:40
cosinator wrote:
how did you get $ n = 1$ or $ n = 0 $ as the $2$ only possibilities?
05.07.2021 04:09
anyone??
05.07.2021 04:26
Since $m$ and $n$ are positive integers and the difference of their squares is odd, one of the numbers must be odd. If $n>1$ then since $m>n$ and both are powers of $2$, that would mean both numbers are even, which cannot happen.
21.09.2021 00:12
\begin{align*} (-1)^x \equiv 1^y \pmod{4} \implies 2 \mid x \\ 1^y \equiv 2^z \pmod{3} \implies 2 \mid z \end{align*} Let $x = 2a, z = 2c$ and thus we have \[ 2^{2y} = 5^{2c} - 3^{2a} = (5^c - 3^a)(5^c + 3^a). \]Notice that $5^c \equiv 1 \pmod{4}$ and that $3^a \equiv \pm 1 \pmod{4}$. This means that exactly $1$ of $5^c - 3^a, 5^c + 3^a$ is divisible by $4$. Now this means that one of them is equal to 2. $\textbf{Case 1:}$ $5^c + 3^a = 2$ This means that $a = c = 0$ which is a contradiction since $x, y, z > 0$. $\textbf{Case 2:}$ $5^c - 3^a = 2$ It is easy to see that $(a, c) = (1, 1)$ is a solution. We claim that this is the only solution. For the rest of the solution we assume that $a, c > 0$. Taking mod 5 we get \[ -3^a \equiv 2 \pmod{5} \implies 3^a \equiv 3 \pmod{5} \]The cycle is $(3, 4, 2, 1)$ which means that $a \equiv 1 \pmod{4}$. Now let $a = 4\beta + 1$. Taking mod 16 we get \[ 5^c-3^{4\beta} \cdot 3 \equiv 2 \pmod{16} \implies 5^c \equiv 5 \pmod{16} \]The cycle is $5, 9, 13, 1$ which means that \[ c \equiv 1 \pmod{4} \qquad (2) \]Let $c = 4\alpha + 1$. Taking mod 13 we get \[ 5^{4\alpha} \cdot 5 - 3^a \equiv 2 \pmod{13} \implies 3^a \equiv 3 \pmod{13} \]The cycle is $3, 9, 1$ which means that \[ a \equiv 1 \pmod{3} \qquad (3) \]Combining $(1)$ and $(3)$ we get \[ a \equiv 1 \pmod{12} \qquad (4) \]Let $a = 12\lambda + 1$. Taking mod 7 we get \[ 5^c - 3^{12\lambda} \cdot 3 \equiv 2 \pmod{7} \implies 5^{c} \equiv 5 \pmod{7} \]The cycle is $5, 4, 6, 2, 3, 1$ which means that \[ c \equiv 1 \pmod{6} \qquad (5) \]Combining this with $(2)$ we get \[ c \equiv 1 \pmod{12} \qquad (6) \] Finally taking mod 9 we get \[ 5^c \equiv 2 \pmod{9} \]Note that since we assumed that $a, c > 0$ this means that from $(4)$ we have $\lambda > 0$ which means that $3^{12\lambda + 1} \equiv 0 \pmod{9}$. The cycle is $5, 7, 8, 4, 2, 1$ which means that $c \equiv 5 \pmod{6}$ which is a contradiction with $(5)$. Since $(a, c) = (1, 1)$ is the only solution to the above diophantine equation, we get that $x=z=2$. Thus the only solution is $\boxed{(2, 2, 2)}$.
21.09.2021 00:49
Quote: $\textbf{Case 2:}$ $5^c - 3^a = 2$ here's another way >.< Taking $\mod 4$, $1-3^a \equiv 2 \pmod{4}$, so $a$ is odd. Taking $\mod 3$, $2^c \equiv 2 \pmod{3}$ so $c$ is also odd. Taking $\mod 7$, we can see that $5^c$ cycles through $5, 4, 6, 2, 3, 1 \pmod{7}$, and $3^a$ cycles through $3, 2, 6, 4, 5, 1 \pmod{7}$. But since both $a$ and $c$ are odd, the only possibility is for $5^c \equiv 5 \pmod{7}$ and $3^a \equiv 3 \pmod{7}$. So $c \equiv 1 \pmod{6}$ and $a \equiv 1 \pmod{6}$ Taking $\mod 9$, we can see that $5^c$ cycles through $5, 7, 8, 4, 2, 1 \pmod{9}$, and for $a \geq 2$, $3^a \equiv 0 \pmod{9}$. But if $3^a \equiv 0 \pmod{9}$, then $5^c \equiv 2 \pmod{9}$ which implies $c \equiv 5 \pmod{6}$, contradiction. So the only solution is when $3^a \equiv 3 \pmod{9}$, which is when $a=1$. So $(a,c)=(1,1)$.
21.09.2021 03:02
x3yukari wrote: Quote: $\textbf{Case 2:}$ $5^c - 3^a = 2$ here's another way >.< Taking $\mod 4$, $1-3^a \equiv 2 \pmod{4}$, so $a$ is odd. Taking $\mod 3$, $2^c \equiv 2 \pmod{3}$ so $c$ is also odd. Taking $\mod 7$, we can see that $5^c$ cycles through $5, 4, 6, 2, 3, 1 \pmod{7}$, and $3^a$ cycles through $3, 2, 6, 4, 5, 1 \pmod{7}$. But since both $a$ and $c$ are odd, the only possibility is for $5^c \equiv 5 \pmod{7}$ and $3^a \equiv 3 \pmod{7}$. So $c \equiv 1 \pmod{6}$ and $a \equiv 1 \pmod{6}$ Taking $\mod 9$, we can see that $5^c$ cycles through $5, 7, 8, 4, 2, 1 \pmod{9}$, and for $a \geq 2$, $3^a \equiv 0 \pmod{9}$. But if $3^a \equiv 0 \pmod{9}$, then $5^c \equiv 2 \pmod{9}$ which implies $c \equiv 5 \pmod{6}$, contradiction. So the only solution is when $3^a \equiv 3 \pmod{9}$, which is when $a=1$. So $(a,c)=(1,1)$. Cool solution!
12.09.2024 17:00
Observe that $x, z$ even by $\mod{3}, \mod{4}$. Let $x = 2m, z = 2k$ and we have the resulting equation $(5^k - 3^m)(5^k + 3^m) = 2^{2y}$. Note that $5^k - 3^m \neq 1$ by Catalan's, so let $5^k - 3^m = 2^{\alpha}$, $5^k + 3^m = 2^{\beta}$, where $\alpha < \beta$. Note that $2\cdot5^k = 2^{\alpha} + 2^{\beta}$, and $v_2(2^{\alpha} + 2^{\beta}) = \alpha$, so $\alpha$ must be $1$, else $5^k$ is even. Therefore, $5^k - 3^m = 2$, and $5^k + 3^m = 2^{2y - 1}$. We have $2\cdot5^k = 2(1 + 2^{2y - 2})$, and $5^k = 1 + 2^{2y - 2}$, impossible again by Catalan's unless $k = 1$, in which case $y = 2$, $m = 1$. So our only solution is $(x, y, z) = (2, 2, 2)$.
12.09.2024 17:28
(mod4): (-1)^x=1 => 2|x (mod3) 2^z=1 => 2|z x=2a,z=2b 2^2y=4^y=(5^b)^2-(3^a)^2=(5^b+3^a)(5^b-3^a) 2y=m+n: 5^b+3^a=2^m, 5^b-3^a=2^n 2x3^a=2^m-2^n=2^n(2^(m-n)-1) because 2^(m-n)-1 = odd, n=1, 2^(m-1)=3^a+1 m>1 (obviously) the solutions qualifying this equation is only (m-1,a)=(1,0),(2,1) (m,a)=(2,0),(3,1) [(2,0) not avaliable because it should be positive] => only solution is (x,y,z)=(2,2,2)