Solve the equation \[ 3^x - 5^y = z^2.\] in positive integers. Greece
Problem
Source: BMO 2009 Problem 1
Tags: number theory, Balkan Mathematics Olympiad
30.04.2009 16:03
Ahiles wrote: Solve the equation $ 3^x + 5^y = z^2$ in positive integers. We denote that a perfect square must be 3k or 3k+1, which k is a interger. So $ 5^y$ must be 3k+1, then y divise by 2. We recall $ y=2a$, a is a postisive interger. $ 3^x + 5^(2a) = z^2<=> 3^a =(z-5^a)(z+5^a)<=>3^m=z-5^a,3^n=z+5^a$ Then $ 3^n-3^m=2.5^a$ so 3 is divise by 2 or 5 that wrong if m,n is positive interger. So m must be zero, n=a. We have:$ 3^m=2.5^a+1$ We consider m with modulo 4. Then m is 4e+1 which e is apositive interger. But like that so $ 3^m-1$ is divise by 4, but right hand is not. So there is no pair (x,y,z) satify for this problem.
30.04.2009 17:57
Considering modulo 3, $ 5^y\equiv1\pmod3$, so $ y$ is even. Let $ y=2a$. So $ 3^x = z^2 - 5^{2a} =(z+5^a)(z-5^a)$ Thus $ z+5^a=3^b,z-5^a=3^c$, where $ b+c=x$ and $ b,c\in\mathbb{N}_0$. We have $ 2\cdot 5^a = 3^b-3^c$. LHS is not divisible by 3, so $ c=0$, $ b=x$. $ z-5^a=1\implies z=5^a+1$ $ 5^a+1+5^a=3^b$ So $ 3^b = 2\cdot 5^a+1$ Consider modulo 5, $ b$ is even. Consider modulo 4, $ b$ is odd. Contradiction, so there are no solutions.
30.04.2009 21:15
I'm sorry. The question was incorrect. Now everything is correct.
30.04.2009 22:17
Looking mod 4, x is even. Let $ x=2a$ $ 9^a-5^y=z^2$ $ (3^a-z)(3^a+z)=5^y$ So let $ 3^a-z=5^b$, $ 3^a+z=5^c$ Then $ 3^a=\frac{5^b+5^c}2$, which is divisible by 5 unless $ b=0$ (since $ b\leq c$) So $ 2\cdot3^a=5^c+1$ Since the only primes dividing the LHS are 2 and 3, this has no solutions for $ c>1$ by Zsigmondy's theorem. So the only solution is $ x=2,y=1,z=2$
30.04.2009 22:42
caffeineboy wrote: ... by Zsigmondy's theorem. Wow... A sledgehammer is not required here. Just look modulo $ 9$ to see that if $ a>1$ then $ c$ is divisible by $ 3$. Then deduce that $ 1+5^c$ is divisible by $ 7$ which is not the case of the $ LHS$. Pierre.
01.05.2009 09:46
alternatively, you might note that $ z = 3^a - 5$, and plug this into the main equation, we get: $ -5^{y}=-10\cdot 3^{a} + 25$, so $ y=1$ and $ a=1$.
01.05.2009 16:16
Like pbornsztein I look modulo 9. Then again I get c is divisible by 3. Let c=3m. Then $ 2.3^{a}=\left(5^{m}+1\right)\left(5^{2m}+5^{m}+1\right)$ so $ 5^{m}+1=2.3^{h}$ and using the method of the infinite descent we get $ c=0$. Contradiction! So $ a=1$ and $ c=1$.
01.05.2009 16:32
SAPOSTO wrote: Like pbornsztein I look modulo 9. Then again I get c is divisible by 3. Let c=3m. Then $ 2.3^{a} = \left(5^{m} + 1\right)\left(5^{2m} + 5^{m} + 1\right)$ so $ 5^{m} + 1 = 2.3^{h}$ and using the method of the infinite descent we get $ c = 0$. Contradiction! So $ a = 1$ and $ c = 1$. Another way to finish it is by noticing that \[ 5^m+1=2\cdot 3^{\alpha} \textrm{ and } 5^{2m}+5^m+1=3^{\beta} \Longrightarrow 5^m=4\cdot3^{2\alpha}-3^{\beta},\] which leads to a contradiction.
02.05.2009 22:05
We can also find out that $ c$ is divisible by 3 in following way: From $ 2.3^{a}=5^{c}+1$ we conclude that $ c$ is odd (modulo 3) so $ c=2m+1$ and we get: $ 2.3^{a}=(5+1)(5^{2m}-5^{2m-1}+...+5^{2}-5+1)$ From last one it is obvious that (for $ a>1$ , case $ a=1$ is easy) we get that 3 divides $ 5^{2m}-5^{2m-1}+...+5^{2}-5+1$ and since each of these $ 2m+1$ summands is congruent 1 modulo 3 we get $ 2m+1$ is congruent 0 modulo 3 being equaivalent to $ c=3d$.
20.06.2009 20:10
there are 100 solutions for this question and I got only 4 points in BMO. I shuold kill myself!
23.06.2009 18:07
I think it is a very easy problem for BMO and it can be a good problem for JBMO
19.03.2011 10:41
Hello dear mathlinkers. Could someone PLEASE answer the following question. Apparently,the choice of modulo 9 is not random. So,what should lead us to consider this equation modulo 9,and why not modulo any other integer? I am preparing for a team selection test in Greece and, since I do not live in a city,I dont have the resources or any teacher to explain these things to me. So I would strongly appreciate your help....... Waiting for a response, Nick
19.03.2011 11:20
nickthegreek wrote: Hello dear mathlinkers. Could someone PLEASE answer the following question. Apparently,the choice of modulo 9 is not random. So,what should lead us to consider this equation modulo 9,and why not modulo any other integer? I am preparing for a team selection test in Greece and, since I do not live in a city,I dont have the resources or any teacher to explain these things to me. So I would strongly appreciate your help....... Waiting for a response, Nick But only $\mod 9$ does not work,others work too,that depends on the way you have proceeded.Specially here $3^x$ is divisible by $9$ for $x>1$,so it was taken for providing informations.
28.06.2011 12:42
Quote: Just look modulo $ 9$ to see that if $ a>1$ then $ c$ is divisible by $ 3$. Then deduce that $ 1+5^c$ is divisible by $ 7$ which is not the case of the $ LHS$ I'm confused.. Can you explain why??? I don't see...
28.06.2011 15:32
$9|5^c+1\implies 5^{2c}\equiv1\pmod9$ and $ord_9(5)=6$. So, $6|2c\implies 3|c$.
28.06.2011 16:53
mathmdmb wrote: $9|5^c+1\implies 5^{2c}\equiv1\pmod9$ and $ord_9(5)=6$. So, $6|2c\implies 3|c$. Ok.. I understand that part... What about this: Then deduce that $1+5^c$ is divisible by 7 which is not the case of the $LHS$ ?
28.06.2011 17:07
$2*3^a=1+125^{c}$ and $7|1+125^{c}$ because $c'$ odd...
28.06.2011 17:15
Quote: $2*3^a=1+125^{c}$ and $7|1+125^{c}$ because $c'$ odd... Thank you! I see now.. I didn't figure out that $c'$ is odd..
11.02.2012 19:50
My Solution :
30.08.2016 10:38
This thread is $7$ years old.But I want to solve problem by using Zsigmondy's theorem. So I revive this thread. Thanks, Takeya.O
30.08.2016 12:59
$$3^x-5^y=z^2$$first we use $\pmod 4$ and get $x=2m$ and $y$ is odd. so we can write $(3^m-z)(3^m+z)=5^y(1)$ let $d=\gcd(3^m-z,3^m+z)=\gcd(3^m-z,2z)$ so $d|2z$ but from $(1)$ we get $d$ is in the form $5^k$. Note that $5\nmid z$ because if $5|z$ then $5|3^x$ which is impossible so we can conclude that $d=1$ so $3^m-z=1,3^m+z=5^y$ and $2\cdot 3^m=5^y+1$ by zygmondy theorem we cannot find $y>1$ because if for all $y>1$ RHS will get e new primitive prime so we conclude $y=1$ and $m=1\implies z=2$. Only $(2,1,2)$ works
30.08.2016 13:38
hey brother don't be rood please because I didn't read any post just solved it sorry
30.08.2016 14:31
@fighter Hey,brother.I want to know Pythagorean triple solution. Could you teach me?
28.10.2016 05:39
AMN300 wrote: Very standard problem
not entirely sure your contradiction is a contradiction?
09.04.2019 07:25
The only solution is $\boxed{(x,y,z)=(2,1,2)}$. Taking the given equation modulo $4$, we learn that \[(-1)^x-1\equiv 0,1\pmod{4},\]so the only possibility is that $x$ and $z$ are even. We actually don't need that $z$ is even, but we will et $x=2b$. Thus, we have \[3^{2b}-z^2=5^y,\]so \[(3^b-z)(3^b+z)=5^y.\]Let the first factor be $5^p$, the second $5^q$. We see that $5^p+5^q=2\cdot 3^b$, which means that we must have $p=0$. Thus, $3^b-z=1$ and $3^b+z=5^y$, so \[2\cdot 3^b=5^y+1.\]For the left side to be divisible by $3$, we need $y=2c+1$ to be odd. Then, we see that $3\nmid 5^y-1$, so \[\nu_3(5^y+1)=\nu_3(25^y-1)=1+\nu_3(y)\]by LTE. Thus, $b=1+\nu_3(y)$, so \[6\cdot 3^{\nu_3(y)}=5^y+1.\]But note that the LHS is at most $6y$, so we have $5^y+1\le 6y$, or $y\le 1$. When $y=1$, we get that $b=1$, so $x=2$. This means that $z^2=9-5=4$, so $z=2$, so the solution must be the one that we claimed. It is easy to see that it works, so we're done. $\blacksquare$
05.10.2019 16:01
04.04.2020 05:17
I claim that the only solution is $(x,y,z) = (2,1,2)$. First, if we take $\mod 4$, since $z^{2} \equiv 0,1\mod 4$ and $5^{y}\equiv 1\mod4$, we must have $x$ as even, or else $3^{x} - 5^{y}\equiv 2\mod4$ which can't be equal to $z^{2}$. Therefore, we denote $x = 2x_{1}$. Rearranging the terms, we get $$3^{2x_{1}} - z^{2} = 5^{y} \Rightarrow (3^{x_{1}} - z)(3^{x_{1}} + z) = 5^{y}$$Since the only factors of $5^{y}$ is powers of $5$, we must have $3^{x_{1}} - z$ and $3^{x_{1}} + z$ as powers of $5$. I claim that $3^{x_{1}} - z = 1$. If $3^{x_{1}} - z$ is a power of $5$ greater than $1$, then $z\equiv 3^{x_{1}}\mod 5$. However, this implies that $3^{x_{1}} + z \equiv 2\cdot 3^{x_{1}}\mod 5$, so $3^{x_{1}} \equiv 0\mod5$, which is clearly impossible. Thus, we have $$3^{x_{1}} - z = 1 \Rightarrow z = 3^{x_{1}} - 1 \Rightarrow 3^{x_{1}}+z = 2\cdot 3^{x_{1}} -1 = 5^{k}$$where $k$ is a positive integer. I claim that for all $x_{1} \geq 2$, there are no solutions. This is because then $2\cdot 3^{x_{1}} \equiv 0 \mod 9$, thus $5^{k} \equiv 8 \mod 9$, which implies $k$ is a multiple of $3$. Rearranging, we get $2\cdot 3^{x_{1}} = 5^{k} + 1$. However, then because $k$ is a multiple of $3$, we have $5^{k} + 1 \equiv 0 \mod 7$. Thus $2\cdot 3^{x_{1}}$ must be divisible by $7$, which is clearly impossible. Thus, the only solution is when $x_{1} = 1$, so our only solutions for $(x,y,z)$ is $(2,1,2)$.
02.08.2020 01:55
Not hard but beautiful problem! Let us consider $mod 4$. We get that $x$ is even and let's denote it as $x = 2k$. Then $5^y = (3^k - z)(3^k + z)$. Then it follows that $3^k - z = 5^a$ $(1)$ and $3^k + z = 5^b$ $(2)$ where $a+b=y$ and $a<b$. If we sum $(1), (2)$ we get that $2*3^k = 5^a + 5^b$ but left side is not divisible by $5$ so we obtain that $a = 0$. Now our equation becomes $2*3^k = 5^b + 1$.If $k>1$ by taking $mod 9$ we get that $b$ is divisible by $3$ and let $b=3l$. Now we get that $5^l + 1 = 2*3^c$ and that $5^2l + 5^l + 1 = 3^d$, then it follows that $5^2l = 3^d - 2*3^c$ which gives us contradiction when watching $mod 3$ so $k=1$. Then plugging back we get that $y=1$, $x=2k=2$ and $z=2$. With this we are done!
22.03.2021 20:00
Take $\pmod{4}$ we get that $x = \text{even}$ $$\implies x = 2m$$ Substituting back this in our original equation we get that $$3^{2m} - 5^y = z^2$$$$\implies (3^m + z)(3^m - z) = 5^y$$$$\implies 3^m + z = 5^a \quad \text{and} \quad 3^m - z = 5^b, \quad a+b=y, \quad a > b$$$$\implies 3^m = 5^b \left(\frac{1 + 5^{a-b}}{2}\right) = 5^b \cdot q$$$$\implies b = 0 \quad \text{because power of 3 can't contain 5 in it}$$Putting $b=0$ we get that $$3^m = \frac{5^y + 1}{2}$$Note that taking $\pmod{3}$ in out original equation we get that $y = \text{odd}$ $$\implies m = v_3\left(\frac{5^y + 1}{2}\right) = v_3(6) + v_3(y) - v_3(2)$$$$\implies m = 1 + v_3(y)$$$$\implies y = 3^{m-1} \cdot k \quad \text{(k is co-prime to 3)}$$$$\implies y \ge 3^{m-1}$$Plugging it back in we get $$2\cdot 3^m = 5^{k \cdot 3^{m-1}} + 1 \ge 5^{3^{m-1}} + 1$$But notice that $RHS > LHS$ for $m-1 > 0$ (Rigorous proof : Induction) $$\implies m-1 = 0 \implies m = 1$$$$\implies 3^1 - z = 1 \implies z = 2$$$$\implies y = 1$$Hence the solutions are $\boxed{(x,y,z) = (2,1,2)}$
23.10.2022 12:54
I have done this task with mod: 3"x=5"y+z"2 Euler's theorem: 3*2/3=2 z"2=1(mod3) 5"y must be: 5"y=2(mod3) because z"2+5"y must divided by 3. if y is 2k+1 then 5"y=2(mod3) because of that y is single integer. let k=0 then x=2 y=1 z=2 problem solved and its the only solve we can have
20.05.2023 01:46
Ahiles wrote: Solve the equation \[ 3^x - 5^y = z^2.\]in positive integers. Greece $3^x-5^y=z^2$ $(-1)^x-1\equiv z^2 \pmod{4}$ $\Rightarrow x\equiv 0 \pmod{2} \Rightarrow x=2a$ $\Rightarrow (3^a-z)(3^a+z)=5^y$ $\Rightarrow 3^a-z=5^m , 3^a+z=5^n$ $\Rightarrow 3^a=\frac{5^m+5^n}{2}$ $\Rightarrow m=0$ $\Rightarrow z=3^a-1, z=5^n-3^a$ $\Rightarrow 2\times 3^a=5^n+1$ If $n>1:$ $5^1+1=2\times 3$ By Zsigmondy´s Theorem: $\exists$ prime $p\neq 2,3/ p|5^n+1 (\Rightarrow \Leftarrow)$ $\Rightarrow n\le 1$ If $n=1:$ $\Rightarrow a=1 \Rightarrow (x,y,z)=(2,1,2)$ is solution If $n=0:$ $\Rightarrow a=0 \Rightarrow x=0 (\Rightarrow \Leftarrow)$ $\Rightarrow (x,y,z)=(2,1,2)$ is a unique solution $_\blacksquare$
03.06.2023 22:36
Claim:The only solution is $\boxed{(x,y,z)=(2,1,2)}$ Proof: Checking$\pmod 3$ gives us $z^2=3^x-5^y\equiv 1,2\pmod 3$ furthermore from the fact that $z^2\equiv 0,1\pmod 3$ we get that $5^y\equiv 1\pmod 3\Longrightarrow 2\nmid y$, $y$ is odd. Furthermore, by taking $\pmod 4$, we get that $z^2=3^x-5^y\equiv (-1)^x-1\pmod 4$ furthermore $z^2\equiv 0,1\pmod 4$ implies that $x$ is even. ($x=2k$) Now taking $\pmod 8$, we get that $z^2=3^{2k}-5^y\equiv 4\pmod 8$ which implies that $z^2\equiv 4\pmod 8\Longrightarrow z$ is even. After these observations, the equation can be rewritten as: $\left(3^k\right)^2-z^2=5^y\Longleftrightarrow (3^k-z)(3^k+z)=5^{a+b}\text{ where } a+b=y\Longrightarrow 3^k-z=5^a\text{ and } 3^k+z=5^b$, now notice that if we sum the equations we get $2\cdot 3^k=5^a+5^b\Longrightarrow 3^k=\frac{5^a+5^b}{2}$ however notice that for $RHS\in \mathbb{Z^+}$, $a$ must be equal to $0$. Thus $a=0\text{ and } b=y$ Thus the equation transforms into $2\cdot3^k=5^y-(-1)^y$ so now we can use $LTE$ to finish up our problem. $\nu_3(2\cdot3^k)=\nu_3(5^y-(-1))\Longrightarrow k=\nu_3(y)+1\Longrightarrow y\ge3^{k-1}$, furthermore by plugging in our result into our original equation we get $6\cdot 3^k-5^{3^{k-1}}-1\ge0$ now let $f(k)=6\cdot3^k-5^{3^{k-1}}-1$ Claim: The previously stated inequality in integers if and only if, $k=1$ Proof: $f'(k)=6\cdot3^k\ln {3}-3^{k-1}\cdot 5^{3^{k-1}}\ln {3}\ln {5}<0, \forall k\ge2$, thus $k=1$ $\square$ Thus $k=1\Longrightarrow x=2$, furthermore form the equation $3^k=z+1$ we get that $z=2$, thus by plugging into our original equation we get $9-4=5^y\Longrightarrow y=1$ So the only solutions are the ones previously stated in the claim$\blacksquare$.
14.10.2023 11:28
Taking $\pmod4$ we see $x$ is a multiple of $2$. Let $x=2x_1.$ From $\pmod3$ we also see that $y\equiv1\pmod 2.$ Say $y=2y_1+1.$ We have $$(3^{x_1})^{2}-z^{2}=(3^{x_1}-z)(3^{x_1}+z)=5^{2y_1+1}.$$If $3^{x_1}\neq z+1$ we have $2(3^{x_1})\equiv0\pmod 5$ a contradiction. Thus $3^{x_1}=z+1$ so, $$2(3^{x_1})=5^{2y_1+1}+1.$$If $x_1\geq2$ we have $5^{2y_1+1}\equiv -1\pmod 9$ and from Euler's Theorem $y_1\equiv 1 \pmod 6.$ Say $y_1=6y_2+1.$ We have $2(3^{x_1})=5^{12y_2+3}+1.$ From sum of cubes we have $$3^{x_1-1}=5^{8y_2+2}-5^{4y_2+1}+1.$$If $x_1\geq 3$ we have $5^{8y_2+2}-5^{4y_2+1}+1\equiv 0\pmod 9.$ Since $4y_2+1\equiv\{1,3,5\}\pmod 6$ we have $5^{8y_2+2}-5^{4y_2+1}+1\equiv3\pmod 9$ a contradiction. Thus $$x_1\leq2.$$For $x_1=2$ we have $81-5^{y}=64$ no solution. For $x_1=1$ we have $9-5^{y}=4$ and $\boxed{(x,y,z)=(2,1,2)}$ as the only solution.
25.01.2025 13:17
After finding the relation like $5^p+1=2\cdot 3^b$, we should notice that power of 3's of LHS is increases much slower than the LHS. Which gives contradiction if we use LTE.