Is every integer odd $p$ not divisible by $3$ a sum of difference of powers of $2$ and $3$ or vice versa?

107 Views Asked by At

Does every odd integer $p$ not divisible by $3$ have the form

$2^a+3^b$, $2^a-3^b$, and or $3^b-2^a$ for integers $a$ and $b$?

Please show proofs if possible. Thanks for help.

2

There are 2 best solutions below

0
On BEST ANSWER

No. $53$ is a counterexample.

There are no integers $a,b$ such that $53=2^a+3^b$ since $$2^a\not=53-3^0,53-3^1,53-3^2,53-3^3$$


Suppose that there are integers $a,b$ such that $53=2^a-3^b$.

It is easy to see that $a\ge 2$ and $b\ge 2$.

We have $$2\equiv (-1)^a-0\pmod 3\implies \text{$a$ is odd}$$ Also, we have $$1\equiv 0-(-1)^b\pmod 4\implies \text{$b$ is odd}$$ Here, let $a=2a'+1,b=2b'+1$ where $a',b'$ are positive integers.

Now $$3\equiv 2\cdot 4^{a'}-3\cdot 9^{b'}\equiv 2(-1)^{a'}-3(-1)^{b'}\equiv 0,1,4\pmod 5$$ which is a contradiction.


Suppose that there are integers $a,b$ such that $53=3^b-2^a$.

It is easy to see that $a\ge 1$ and $b\ge 1$.

We have $$2\equiv 0-(-1)^a\pmod 3\implies \text{$a$ is even}$$

Also, we have $$1\equiv (-1)^b-0\pmod 4\implies \text{$b$ is even}$$

So, letting $a=2a',b=2b'$ where $a',b'$ are positive integers, we have $$3\equiv 9^{b'}-4^{a'}\equiv (-1)^{b'}-(-1)^{a'}\pmod 5\implies \text{$b'$ is odd, $a'$ is even}$$

Letting $a=4k,b=4m+2$ where $k$ is a positive integers and $m$ is a non-negative integer, we have $$5\equiv 9\cdot 81^m-16^k\equiv 9\cdot 1^m-0\equiv 9\pmod{16}$$ which is a contradiction.

1
On

It can be verified by a finite if tedious computation that none of the equations \begin{align} 2^a + 3^b \equiv 133 \pmod {683} \\ 2^a - 3^b \equiv 133 \pmod {683} \\ 3^b - 2^a \equiv 133 \pmod {683} \end{align} have a solution $(a,b)$, and therefore $133$ cannot be written as sum or difference of a power of $2$ and a power of $3$.

(I chose $683$ because both $2$ and $3$ have relatively small multiplicative orders modulo $683$: $2^{22} \equiv 3^{31} \equiv 1 \pmod{683}$. Then I tested the above congruences by brute force for $0 \le a < 22$ and $0 \le b < 31$. I tried this for several primes, but $683$ was the first that worked.)