How to solve the Diophantine equation $5^x−3^y=2$?

144 Views Asked by At

Let $x$ and $y$ be natural numbers. How do I solve the equation $5^x-3^y=2$?

I think the only answer is $(x,y)=(1,1)$

I thought about this problem as follows.

From $5^2-3^3=-2$

$5^x+5^2=3^y+3^3$

$25(5^{x-2}+1)=27(3^{y-3}+1)$

Define an integer k greater than or equal to 1

$5^{x-2}=27k-1$

$3^{y-3}=25k-1$

And from $5^1-3^1=2$

$5^x-5=3^y-3$

$5(5^{x-1}-1)=3(3^{y-1}-1)$

Define an integer m greater than or equal to 1

$5^{x-1}=3m+1$

$3^{y-1}=5m+1$

Repeating formula deformations but finding nothing.I wanted to show that there is no solution other than $(x,y)=(1,1)$.

2

There are 2 best solutions below

3
On BEST ANSWER

This can be solved with a bit of modular arithmetic.

First of all, obviously $x$ and $y$ are nonzero. So $5\mid 5^x$, and $3^y\equiv3\pmod5$, so $y\equiv1\pmod4$.

Now $3^y\equiv3\pmod{3^4-1}$ and $3^4-1=16\cdot5$. So $5^x\equiv5\pmod{16}$, so $x\equiv1\pmod4$.

Now $5^x\equiv5\pmod{5^4-1}$ and $5^4-1=16\cdot3\cdot13$. So $3^y\equiv3\pmod{16}$ and $3^y\equiv3\pmod{13}$. So we get $y\equiv1\pmod4$ and $y\equiv1\pmod3$, so $y\equiv1\pmod{12}$.

Now $3^y\equiv3\pmod{3^{12}-1}$ and $3^{12}-1=16\cdot5\cdot7\cdot13\cdot73$. So $5^x\equiv5\pmod7$, thus $x\equiv1\pmod6$. Combining with $x\equiv1\pmod4$, we see $x\equiv1\pmod{12}$.

Now $5^x\equiv5\pmod{5^{12}-1}$ and $5^{12}-1=16\cdot9\cdot7\cdot13\cdot31\cdot601$. This basically ends the argument, since we now (finally!) have a modulus $9=3^2$, so $3^y\equiv3\pmod9$, so $y=1$. Thus the only solution is $(x,y)=(1,1)$.

0
On

This solution avoids difficult computation.

Claim: If $(x_0,y_0)$ is a solution, then $(x_0,y)$ and $(x,y_0)$ can never be solutions for $x \neq x_0$ and $y \neq y_0$.

Indeed suppose $5^{x_0} - 3^{y_0}=2$. Setting $y>y_0$ gives us that $5^{x_0}-3^y<2$ while setting $y<y_0$ gives us that $5^{x_0} -3^y >2$. For $x>x_0$ we get that $5^x - 3^{y_0}>2$ and for $x<x_0$ we get that $5^x-3^{y_0}<2$. This proves our claim.

By observation and inspection, it is clear that $(1,1)$ is a solution.

Suppose there was a solution with $y\geq 2$. It follows we could write $2=5^x-9(3^m)$ for some non-negative $m \in \mathbb Z$ and positive $x \in \mathbb Z$. Taking the equation $\bmod 9$ gives us $\bmod 9: 5^x \equiv 2$. Since $\phi(9)=6$, checking $x\in \{0,1,2,3,4,5\}$ gives us that $x = 6n + 5$ for non-negative $n \in \mathbb Z$.

Substituting $x=6n+5$ gives us then $$5^5\cdot5^{6n} - 9\cdot 3^m =2$$

Consider the equation $\bmod 28$ to get $$\bmod 28: 17 - 9\cdot 3^m \equiv 2\implies 3^m \equiv 11$$

Now since $\phi(28)=12$, we need to check $m \in \{0,1,2,3,4,5,6,7,8,9,10,11\}$. We see that no $m$ satisfies this equation, meaning that there are no integer solutions to the equation. This means there are no solutions for $y \geq 2$.

So a solution can only arise if $y=1$, and we indeed know the solution is $(1,1)$, meaning there are no other solutions by the first claim.