2

Solve $2^x=3^y+509$ over positive integers. My solution is as follows: $$\begin{align*}2^x=3^y+509&\Longrightarrow 2^x-512=3^y+509-512\\&\Longrightarrow 2^x-2^9=3^y-3\\&\Longrightarrow 2^9(2^{x-9}-1)=3(3^{y-1}-1)\\&\Longrightarrow (x,~y)={(9,~1)}\end{align*}$$ but how can I see that this the only solution?

$(2^x-1)509=3(3^y-2^x)$ and $509$ and $3$ prime then for any $k\in\mathbb{Z^+}$, $2^x=3k+1$, $3^y-2^x=509k$ so $3^y=512k+1$ but I can't show that there is no solution for this equation for $y>1.$

Another approach: For modulo 9 if we accept there is a solution to $y\ge2$ so $2^x\equiv 5\mod 9$ hence $x=6k+5$ and x must be an odd number.

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
  • 1
    https://math.stackexchange.com/questions/2982329/im-having-trouble-understanding-hensels-lemma may help. Also https://math.stackexchange.com/questions/3905310/find-all-solutions-to-the-diophantine-equation-7x-3y4-in-positive-integers and https://math.stackexchange.com/questions/1781722/prove-that-2x-3-cdot-9m5-has-no-positive-integer-solutions-for-m-geq-2 and https://math.stackexchange.com/questions/3493828/solve-diophantine-equation-2x-5y3-for-non-negative-integers-x-y – Gerry Myerson Sep 11 '24 at 13:29
  • 1
    If there is another solution then $2^x-2^9=3^y-3$ whose only integer solution is when $LHS=RHS=0$ – Ataulfo Sep 11 '24 at 13:32
  • 3
    In general, if $a, b, c$ are nonzero integers with $a, b \ge 2$, then equation $a^x - b^y = c$, has at most two solutions in positive integers $x$ and $y$. This is a result by M. A. Bennett (On some exponential equations of S.S. Pillai, Canad. J. Math. 53 (2001), 897-922). An online copy can be found here. Theorem 1.6 there also tell us there is no other solution for your case. – achille hui Sep 11 '24 at 14:01
  • 1
    Welcome to Mathematics Stack Exchange. From where did you get this problem? – J. W. Tanner Sep 16 '24 at 01:31
  • I don't know origin of problem; the teacher of my buddy asked the question to him. – littlemathquark Sep 25 '24 at 11:00
  • @Anne Bauval: I noticed that you changed the tag from [tag:number-theory] to [tag:elementary-number-theory], but according to the tag descriptions, only linear Diophantine equations are [tag:elementary-number-theory] – J. W. Tanner Sep 26 '24 at 22:37
  • @J.W.Tanner Quote from the tag description: "For questions on introductory topics in number theory, such as divisibility, prime numbers, gcd and lcm, congruences, linear Diophantine equations, [...] and related topics." Thé tag "number theory" is for more advanced topics, to which this post does not belong. – Anne Bauval Sep 27 '24 at 04:05

2 Answers2

7

For brevity, let $X=x-9,$ and $Y=y-1.$

$2^9\mid3^Y-1\implies 128\mid Y\implies 193\mid 3^Y-1\implies193\mid2^X-1$

$\implies96\mid X\implies 6\mid X\implies9\mid2^X-1\implies 3\mid3^Y-1\implies Y=0.$

Addendum

In response to a comment by Will Jagy, here I explain how I came up with the above proof. From $2^9(2^X-1)=3(3^Y-1)$, we have $3\mid2^X-1$, which implies $X$ is even (not so significant to my mind), and $2^9\mid3^Y-1$, which implies $\color{green}{2^7}\mid Y$ -- see here. This means that any odd factor of $3^{\color{green}{128}}-1$ divides $2^X-1$. My goal was then to find an odd factor of $3^{128}-1$ that divided $2^{\color{blue}{6n}}-1$, so I could then say that $9\mid3(3^Y-1$) , leading to a contradiction unless $Y=0$.
According to Wolfram Alpha, $3^{128}-1=2^9×5×17×41×\color{red}{193}\;\times$ $21523361×926510094425921×1716841910146256242328924544641.$
If $5\mid2^X-1$, then $4\mid X\;.\;$ If $17\mid2^X-1,$ then $8\mid X\;.\;$ If $41\mid2^X-1$, then $20\mid X\;.\;$ Et cetera. The only one that works is if $\color{red}{193}\mid2^X-1$, then $\color{blue}{96}\mid X$. That's how I got $128$, $193$, and $96$.

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
1

Suppose $y\ge 2$. Then the equation is doomed to fail $\bmod(9×13)$. Therefore no solution is possible except $(x,y)=(9,1)$.

With $y\ge2$, we have $2^x\equiv5\bmod9$ from which $x\equiv5\bmod6$. Then with this residue for $x$,

$2^x\in\{6,7\}\bmod13$

while

$3^y\in\{1,3,9\}, 509\equiv2\bmod13.$

None of the accessible residue combinations satisfies $2^x\equiv3^y+509\bmod13$.

Oscar Lanzi
  • 48,208
  • +1; I think your argument is simpler than mine and more general — $509$ could be replaced by any $n\equiv41\bmod117=9\times13$ – J. W. Tanner Sep 27 '24 at 19:10
  • 1
    @J.W.Tanner The next such $n$ that gives a solution with $y=1$ is $\text{2,097,149}$, the general form is $8^{4k+3}-3$. – Oscar Lanzi Sep 27 '24 at 19:39