2

I want to find all integer solutions of $3^a + 7 = 2^b$

I have found (by brute force) the two solutions
$3^0 + 7 = 2^3$ and
$3^2 + 7 = 2^4$

but I want to see if there are more solutions. I have found that if (b mod 3) = b' then (a mod 6) must be 2b', and that (a mod 4) can't be 1, but that's as far as I get and I have no clue how to make progress.
Any ideas? TIA

Leo
  • 212
  • 2
  • 6

1 Answers1

2

A negative $b$ or a negative $a$ cannot lead to a solution. So $a,b\ge 0$. For $a=0$ we obtain OP's first solution $3^0+7=2^3$. Else $a\ge 1$. Then taken modulo $3$ the powers of two ($2\equiv -1\ [3]$) for $b=0,1,2,3,\dots$ are $1,-1,1,-1,\dots$, so the involved two-power $b$ is even, $b=2B$ for some natural $B$.

Since $b\ge 3$, considering the L.H.S. modulo four, we have for $a=0,1,2,3,\dots$ the values $1+7, -1+7, 1+7, -1+7,\dots$ so the involved three-power is even, $a=2A$ for some natural $A$. We rewrite now the given relation as follows: $$ 7 = 2^a-3^b=2^{2A}-3^{2B}=(2^A-3^B)(2^A+3^B)\ . $$ This is possible only when $(2^A-3^B)=1$ and $(2^A+3^B)=7$, so $2^A=(7+1)/2=4$, and $3^B=(7-1)/2=3$, leading to the second solution given by the OP.

$\square$

dan_fulea
  • 32,856
  • FYI, this uses basically the same method as the accepted answer of the duplicate question. – John Omielan Apr 08 '22 at 09:51
  • 1
    @JohnOmielan Yes, it is the only natural idea in such situations. Unfortunately i started typing the answer. We may vote to close the question for the reason of being a duplicated question. (... voted for it last seconds) – dan_fulea Apr 08 '22 at 09:54