Solutions to $2^a3^b+1=2^c+3^d$

668 Views Asked by At

Find all $a,b,c,d$ positive integer such that: $2^a3^b+1=2^c+3^d$

My progress:

One solution satisfying is $$\boxed{a=1,b=1,c=2,d=1} $$

We first take $\mod 3$ which gives $$ L.H.S\equiv 1\mod 3,~~R.H.S\equiv 2^c\mod 3$$ Hence we get $c$ even. So let $c=2k.$

We get $$2^a3^b-3^d=2^{2k}-1=(2^k-1)(2^k+1). $$

Now note that $2^k-1,2^k+1$ are relatively prime. Because, if not then let $d$ be the common divisor.

Then $$d|2^k-1,~~d|2^k+1\implies d|(2^k+1)-(2^k-1)=2\implies d|2^k\implies d|2^k+1-2^k=1.$$

Now there are two cases. So using the fact that $2^k-1,2^k+1$ are relatively prime and then for odd k $3|2^k+1$ and for even $k$ $3|2^k-1$

Case 1: When $d<b$ then $$2^a3^b-3^d=3^d(2^a3^{b-d}-1)=(2^k-1)(2^k+1)$$

  • $K$ is odd $$\implies v_3(2^k+1)=d,~~3\nmid 2^k-1. $$
  • $K$ is even $$\implies v_3(2^k-1)=d,~~3\nmid 2^k+1. $$

Case 2: When $d>b$ then $$2^a3^b-3^d=3^b(2^a -3^{d-b})=(2^k-1)(2^k+1)$$

  • $K$ is odd $$\implies v_3(2^k+1)=b,~~3\nmid 2^k-1. $$
  • $K$ is even $$\implies v_3(2^k-1)=b,~~~~3\nmid 2^k+1. $$

P.S. This is my 100th post in MSE. The other solutions are there in the chat. Any elementary method?

4

There are 4 best solutions below

2
On BEST ANSWER

$$2^a3^b+1=2^c+3^d, \ \ \ a,b,c,d \geqslant 1$$

Proof has two parts. In the first part we will construct optimistic upper bound on $a,b$. In the first part we will construct optimistic upper bound on $a,b$. In the second part we will use standard method of solving exponential diophantine equation: to run all variants variables to find all solutions and to prove there are no other solutions by squeeze variables space with reduction convenient modules.

Part I. Assume $a\geqslant 6, b\geqslant 4$.

If $a\leqslant c$ then by $\mod {2^a}$ we have

$$3^d\equiv 1 \pmod {2^a} \Leftrightarrow d\equiv 0\pmod {2^{a-2}} \Leftrightarrow d=2^{a-2}d_1\geqslant 2^{a-2}$$

Else if $a> c$ then:

By $\mod {2^c}$: $$3^d\equiv 1 \pmod {2^c} \Leftrightarrow d\equiv 0\pmod {2^{c-2}} \Leftrightarrow d=2^{c-2}d_1$$

and by $\mod {2^a}$:

$2^c+3^d\equiv 1 \pmod {2^a} \Leftrightarrow 3^d-1\equiv -2^c \pmod {2^a} \Leftrightarrow 2^{c}d_1\equiv -2^c \pmod {2^a}$

$\Leftrightarrow d_1\equiv -1 \pmod {2^{a-c}} \Leftrightarrow d=2^{c-2}(-1+2^{a-c}d_2)\geqslant 2^{a-2}-2^{c-2}\geqslant 2^{a-3}$

In both cases $d\geqslant 2^{a-3}$

Similarly if $ b\leqslant d$ then by $\mod {3^b}$ we have

$2^c\equiv 1 \pmod {3^b} \Leftrightarrow c\equiv 0\pmod {2\cdot 3^{b-1}} \Leftrightarrow c=2\cdot 3^{b-1}c_1\geqslant 2\cdot 3^{b-1}$

Else if $b> d$ then by $\mod {3^d}$ we have

$2^c\equiv 1 \pmod {3^d} \Leftrightarrow c\equiv 0\pmod {2\cdot 3^{d-1}} \Leftrightarrow c=2\cdot 3^{d-1}c_1$

and by $\mod {3^b}$:

$2^c+3^d=4^{3^{d-1}c_1}+3^d\equiv 1 \pmod {3^b} \Leftrightarrow 3^{d}c_1\equiv -3^d\pmod {3^b} \Leftrightarrow$

$c_1\equiv -1\pmod {3^{b-d}} \Leftrightarrow c=2\cdot 3^{d-1}(-1+3^{b-d}c_2)=2\cdot 3^{b-1}c_2 - 2\cdot 3^{d-1} \geqslant 2\cdot 3^{b-2}$

In both cases $c\geqslant 2\cdot 3^{b-2}$

Since $A+B> 2\sqrt{AB}$ we have for $A=2^c, B = 3^d$:

$$2^a3^b+1 = 2^c+3^d > 2^{c/2+1} \cdot 3^{d/2}$$

Using $c\geqslant 2\cdot 3^{b-2}, d\geqslant 2^{a-3}$ we have

$$2^a3^b+1 > 2^{1+3^{b-2}} \cdot 3^{2^{a-4}}$$

But this is impossible because $3^b < 2^{1+3^{b-2}}$ for $b\geqslant 4$ and $2^a<3^{2^{a-4}}$ for $a\geqslant 6$.

Therefore assumption $a\geqslant 7, b\geqslant 4$ is false and $a\leqslant 6$ or $b\leqslant 3$

Part II.

Lemma 1: $2^x+1=3^y,x,y\geqslant 1 \Leftrightarrow (x,y)\in\{(1,1),(3,2)\}$

Let $S$ - solutions set $2^a3^b+1=2^c+3^d$ for $a,b,c,d \geqslant 1$

By $\mod 3$: $1\equiv 2^c \pmod{3} \Rightarrow c\equiv 0\pmod 2\Rightarrow c=2c_1$:

$a,b,c_1,d \geqslant 1$ $2^a3^b+1=2^{2c_1}+3^d$

$a=1$ or $a\geqslant 2$.

Consider case $a=1$

If $a=1$ then we have $b,c_1,d \geqslant 1$ and $2\cdot 3^b+1=2^{2c_1}+3^d$

If $d=1$ then we have $b,c_1 \geqslant 1$, $3^b-1=2^{2c_1-1}$.

By Lemma we have $(2c_1-1,b)\in\{(1,1),(3,2)\} \Leftrightarrow (c_1,b)\in\{(1,1),(2,2)\}$ i.e. $\boxed{(1,1,2,1),(1,2,4,1)\in S}$

If $b=1$ then $c_1=1, d=1$, so we have $(1,1,2,1)\in S$ again.

Now $b\geqslant 2, c_1 \geqslant 1, d \geqslant 2$

By $\mod {3^2}$: $1\equiv (1+3)^{c_1}\equiv 1+3c_1\pmod{3^2}\Leftrightarrow c_1\equiv 0\pmod{3}$.

$c_1=3c_2$

$b\geqslant 2, c_2 \geqslant 1, d \geqslant 2$

$2\cdot 3^b+1=2^{6c_2}+3^d$

By $\mod 7$: $2\equiv 3^{d-b} \pmod 7 \Rightarrow 2^3\equiv 3^{3(d-b)} \pmod 7 \Leftrightarrow 1\equiv (-1)^{(d-b)} \pmod 7 \Leftrightarrow d\equiv b \pmod 2$.

By $\mod 8$ with $d\equiv b \pmod 2$: $2\cdot 3^b\equiv 3^d-1 \pmod 8 \Leftrightarrow 2\equiv 0 \pmod 8$ or $6\equiv 2 \pmod 8$

Therefore there is no other solutions for $a=1$.

Now hereinafter $a\geqslant 2$

If $a\geqslant 2$ then we have $a \geqslant 2, b,c_1,d \geqslant 1$ and $2^a3^b+1=2^{2c_1}+3^d$

By $\mod 4$: $1\equiv 3^d \pmod{4} \Rightarrow d\equiv 0\pmod 2 \Rightarrow d=2d_1$:

$a \geqslant 2, b,c_1,d_1 \geqslant 1$

$2^a3^b+1=2^{2c_1}+3^{2d_1}$

By $\mod 8$: $2^a3^b\equiv 4^{c_1} \pmod{8} \Leftrightarrow 2^{a-2}3^b\equiv 4^{c_1-1} \pmod{2}$. Therefore $a=2, c_1=1$ or $a\geqslant 3, c_1\geqslant 2$

Consider case $a=2, c_1=1$

If $a=2, c_1=1$ then we have $b,d_1 \geqslant 1$ and $4\cdot 3^b=3+3^{2d_1}$

$\Rightarrow 4\cdot 3^b\equiv 3 \pmod{9} \Leftrightarrow \cdot 3^{b-1}\equiv 1 \pmod{3} \Rightarrow b=1$:

$12=3+3^{2d_1} \Rightarrow d_1=1$. So $\boxed{(2,1,2,2) \in S}$ and there is no solutions for $a=2, c_1=1$.

Now hereinafter $a\geqslant 3, c_1\geqslant 2$

Then we have $a \geqslant 3, b \geqslant 1, c_1 \geqslant 2, d_1 \geqslant 1$ and $2^a3^b+1=2^{2c_1}+3^{2d_1}$

By $\mod 16$: $2^a3^b\equiv 3^{2d_1}-1\equiv (1+8)^{d_1}-1\equiv 8d_1 \pmod{2^4}\Leftrightarrow 2^{a-3}3^b\equiv d_1 \pmod{2}$. Therefore $a=3, d_1\equiv 1\pmod 2$ or $a\geqslant 4, d_1\equiv 0\pmod 2$

Consider case $a=3,d_1\equiv 1\pmod 2$

Then we have $d_1=1+2d_2, b \geqslant 1, c_1 \geqslant 2, d_2 \geqslant 0$ and $8\cdot 3^b+1=2^{2c_1}+3^{2+4d_2}$

For $b\in\{1;2\}$ we have $\boxed{(3,1,4,2), (3,2,6,2)\in S}$. Now $b\geqslant 3$.

If $d_2=0$ then we have $8\cdot 3^b-8=2^{2c_1} \Leftrightarrow 2^{2c_1-3}+1=3^b$. By Lemma we have $(2c_1-3,b)\in\{(1,1),(3,2)\} \Leftrightarrow (c_1,b)\in\{(2,1),(3,2)\}$ i.e. $(3,1,4,2), (3,2,6,2)\in S$ again.

By $\mod 27$: $2^{2c_1}\equiv 1\pmod{3^3}\Leftrightarrow c_1\equiv 0\pmod 9, c_1=9c_2$

Then we have $c_1=9c_2, b \geqslant 1, c_2 \geqslant 1, d_2 \geqslant 0$ and $8\cdot 3^b+1=2^{18c_2}+3^{2+4d_2}$

Now $b\geqslant 3, d_2\geqslant 1$.

By $\mod 73$: $8\cdot 3^b\equiv 3^{2+4d_2}\pmod {73}\Rightarrow 8^6\cdot 3^{6b}\equiv 3^{12+24d_2}\pmod {73}\Leftrightarrow 3^{6b}\equiv1\pmod {73} \Leftrightarrow b\equiv 0\pmod 2$

Then we have $b=2b_1, b_1 \geqslant 1, c_2 \geqslant 1, d_2 \geqslant 1$ and $8\cdot 3^{2b_1}+1=2^{18c_2}+3^{2+4d_2}$

By $\mod 5$: $3\cdot (-1)^{b_1}+1=(-1)^{c_2}+4\pmod 5\Leftrightarrow 3\cdot (-1)^{b_1}=(-1)^{c_2}+3\pmod 5 \Rightarrow c_2\equiv 1\pmod 2, b_1\equiv 1\pmod 2$

Then we have $c_2=1+2c_3, b_1=1+2b_2, b_2 \geqslant 0, c_3 \geqslant 0, d_2 \geqslant 1$ and $8\cdot 3^{2+4b_2}+1=2^{18+36c_2}+3^{2+4d_2}$

By $\mod 19$: $8\cdot 3^{2+4b_2}\equiv 3^{2+4d_2}\pmod{19}\Leftrightarrow \left(\frac{2}{19}\right)=1$ but it's false.

Therefore there is no other solutions for $a=3,d_1\equiv 1\pmod 2$.

Now hereinafter $a\geqslant 4, d_1\equiv 0\pmod 2$

Then we have $d_1=2d_2, a \geqslant 4, b \geqslant 1, c_1 \geqslant 2, d_2 \geqslant 1$ and $2^a3^b+1=2^{2c_1}+3^{4d_2}$.

By $\mod 5$: $2^{a-b}=(-1)^{c_1}\pmod{5}\Rightarrow a\equiv b\pmod 2$

Then we have $a\equiv b\pmod 2, a \geqslant 4, b \geqslant 1, c_1 \geqslant 2, d_2 \geqslant 1$ and $2^a3^b+1=2^{2c_1}+3^{4d_2}$.

By $\mod 9$: $2^a3^b+1\equiv 2^{2c_1}\equiv(1+3)^{c_1}\equiv 1+3c_1\pmod{9} \Leftrightarrow 2^a3^{b-1}\equiv c_1\pmod{3}$. Therefore $b=1, c_1\equiv 2^a\pmod 3$ or $b\geqslant 2, c_1=3c_2$.

$$$$

Consider case $b=1, c_1\equiv 2^a\pmod 3$.

Since $a\equiv b\pmod 2$ we have $a\equiv 1\pmod 2, a=2a_1+1\Rightarrow c_1\equiv 2\pmod 3, c_1=2+3c_2$.

Then we have $a_1 \geqslant 2, c_2 \geqslant 0, d_2 \geqslant 1$ and $3\cdot 2^{2a_1+1}+1=2^{4+6c_2}+3^{4d_2}$.

If $c_2=0$ then we have $2^{2a_1+1}-5=3^{4d_2-1}$

Lemma 2: $2^x-5=3^y \Leftrightarrow (x,y)\in\{(3,1),(5,3)\}$.

By Lemma 2 we have $(2a_1+1,4d_2-1)\in\{(3,1),(5,3)\} \Leftrightarrow (a_1,d_2)=(2,1) \Leftrightarrow \boxed{(5,1,4,4)\in S}$

If $c_2\geqslant 1$ then we have $a_1 \geqslant 2, c_2 \geqslant 1, d_2 \geqslant 1$ and $3\cdot 2^{2a_1+1}+1=2^{4+6c_2}+3^{4d_2}$.

By $\mod 32$: $3^{4d_2}\equiv 1\pmod{2^5}\Leftrightarrow d_2\equiv 0\pmod 2, d_2=2d_3$

Then we have $a_1 \geqslant 2, c_2 \geqslant 1, d_3 \geqslant 1$ and $3\cdot 2^{2a_1+1}+1=2^{4+6c_2}+3^{8d_2}$.

By $\mod 41$: $3\cdot 2^{2a_1+1}\equiv 2^{4+6c_2}\pmod{41} \Rightarrow \left(\frac{3}{41}\right)=1$ but $\left(\frac{3}{41}\right)=(-1)^{\frac{41-1}{2}\frac{3-1}{2}}\left(\frac{41}{3}\right)=-1$. A contradiction.

Therefore there is no other solutions for case $b=1, c_1\equiv 2^a\pmod 3$.

Now hereinafter $b\geqslant 2, c_1=3c_2$

Then we have $a\equiv b\pmod 2, a \geqslant 4, b\geqslant 2, c_2 \geqslant 1, d_2 \geqslant 1$ and $2^a3^b+1=2^{6c_2}+3^{4d_2}$

By $\mod 7$: $2^a3^b\equiv 3^{4d_2}\pmod 7 \Rightarrow 2^{3a}3^{3b}\equiv 3^{12d_2}\pmod 7 \Rightarrow b\equiv 0\pmod 2, b=2b_1$:

Then we have $a=2a_1, a_1 \geqslant 2, b_1 \geqslant 1, c_2 \geqslant 1, d_2 \geqslant 1$ and $2^{2a_1}3^{2b_1}+1=2^{6c_2}+3^{4d_2}$

Consider case $b_1=1$.

If $a_1=2$ then we obtain $\boxed{(4,2,6,4)\in S}$

If $a_1\geqslant 3$ then by $\mod 2^6$ we have $3^{4d_2}\equiv (1+8)^{2d_2}\equiv1\pmod {2^6} \Leftrightarrow 16d_2\equiv 0\pmod{2^6} \Leftrightarrow d_2\equiv 0\pmod{4}$

Then we have $d_2=4d_3, a_1 \geqslant 2, c_2 \geqslant 1, d_3 \geqslant 1$ and $9\cdot 2^{2a_1}+1=2^{6c_2}+3^{16d_3}$

By $\mod 17$: $9\equiv4^{3c_1-a_1}\pmod{17} \Rightarrow 9^2\equiv 13\equiv 4^{2(3c_1-a_1)}\equiv \pm 1\pmod{17}$ - a contradiction.

Now hereinafter $a_1 \geqslant 2, b_1\geqslant 2, c_2 \geqslant 1, d_2 \geqslant 1$ and $2^{2a_1}3^{2b_1}+1=2^{6c_2}+3^{4d_2}$

By $\mod 3^4$: $2^{6c_2}\equiv 1\pmod{3^4}\Leftrightarrow c_2\equiv 0\pmod{3^2}$

Then we have $c_2=9c_3, a_1 \geqslant 2, b_1\geqslant 2, c_3 \geqslant 1, d_2 \geqslant 1$ and $2^{2a_1}3^{2b_1}+1=2^{54c_3}+3^{4d_2}$

By $\mod 73$: $2^{2a_1}\equiv 9^{2d_2-b_1}\pmod{73}\Rightarrow 2^{6a_1}\equiv 9^{3(2d_2-b_1)}\equiv (-1)^{b_1}\pmod{73}\Rightarrow a_1\equiv 0\pmod 3$

Then we have $a_1=3a_2, c_2=9c_3, a_2 \geqslant 1, b_1\geqslant 2, c_3 \geqslant 1, d_2 \geqslant 1$ and $2^{6a_1}3^{2b_1}+1=2^{54c_3}+3^{4d_2}$

Now hereinafter $a_2 \geqslant 1, b_1\geqslant 2$. But $b=2b_1\geqslant 4, a=6a_2\geqslant 6$ and from Part I we have condition $a\leqslant 6$ or $b\leqslant 3$. Therefore $a\leqslant 6$, and so $a=6, a_2=1$ - we finally have last case:

Consider case $a_1=3$:

$b_1 \geqslant 2, c_2 \geqslant 1, d_2 \geqslant 1$ and $64\cdot 3^{2b_1}+1=2^{54c_3}+3^{4d_2}$

By $\mod p$ for $p=262657$: $64\cdot 3^{2b_1}\equiv 3^{4d_2}\pmod {p}$

$3^{4\cdot 3648}\equiv 1\pmod p \Rightarrow \pm 64^{4\cdot 3648}\equiv 262144 \equiv 1\pmod p$ - contradiction.

Therefore there is no other solutions.

P.S. Proof is long but it's very uniform. If proof have a mistake it may be easy to fix. Lemmas proofs are obvious :)

3
On

There might not be an easy elementary solution to this equation. It was solved (there are $12$ nontrivial solutions in integers, where trivial solutions have at least $2$ of the exponents equal to $0$) by Tijdeman and Wang in a paper in the Pacific Journal in 1988; their argument uses bounds for linear forms in logarithms. The nontrivial solutions are as noted by Robert Israel, as well as $(a,b,c,d)$ in the following list : $$ (2,0,1,1),\; (4,0,3,2), \;(-2,2,-2,1),\; (2,-1,1,-1). $$

2
On

This is not an answer, it is a comment for discussion:

We can construct similar equation as follows:

$$\begin{cases}3^m-2^n=1\\3^r-2^s=1\end{cases}$$

Multiplying both sides we get:

$$3^{m+r}-3^m\cdot 2^s-3^r\cdot 2^n +2^{n+s}=1$$

$$\big(\frac{3^m}{3^r}-\frac{2^n}{2^s}\big)2^s\cdot3^r+1=2^{n+s}+3^{m+r}$$

$$\Rightarrow \big(3^{m-r}-2^{n-s}\big)2^s\cdot 3^r +1=2^{n+s}+3^{m+r}$$

If $m-r=1$ and $n-s=1$ then we have:

$$2^s\cdot3^r +1=2^{n+s}+3^{m+r}$$

Substituting $s=a, r=b, n+s=c$ and $m+r=d$ we get the equation. Each of equations in system have similar solutions in $\mathbb Z$ which may give solutions of final equation, i.e we may proceed reversely and find the solutions under constrains $m-r=1$ and $ n-s=1$; $m, n, r, s $ $\in \mathbb Z$.

0
On

This is a discussion of a class of solutions for the equation $2^a3^b+1=2^c+3^d$, which includes most of the known solutions. At the end, I will briefly describe the known solutions that are not in this class. Since I cannot explain the solutions not in the class I analyze, this can only be considered a partial answer.

Numbers of the form $2^a3^b$ have two non-trivial idempotents $m,n$, corresponding to $m\equiv 0 \bmod 2^a \land m \equiv 1 \bmod 3^b$, and $n \equiv 1 \bmod 2^a \land n \equiv 0 \bmod 3^b$, with the further limitation that $\sqrt{2^a3^b} < m,n < 2^a3^b$. Note that $0,1$ are trivial idempotents with regard to any modulus. Idempotents of $w=2^a3^b$ have the property that $m^2 \equiv m \bmod w \Rightarrow m^2-m=m(m-1) \equiv 0 \bmod w$. The sum of the two non-trivial idempotents of $2^a3^b$ is $m+n=2^a3^b+1$.

A class of solutions to the equation $2^a3^b+1=2^c+3^d$ comprises instances where $2^c$ and $3^d$ are idempotents of $2^a3^b$. To identify such instances, I proceed by first looking for an idempotent of the form $3^d$ for $2^a3^b$. This requires that $(2^a3^b)\mid 3^d(3^d-1)$, which is satisfied when $$3^b\mid 3^d \land 2^a\mid (3^d-1) \land 3^b \le 3^d < 2^a3^b$$ The final condition can be restated by analyzing the terms $\log_3$, resulting in $b \le d < b+\log_3(2^a)$.

If an idempotent of the form $3^d$ can be found, the second idempotent is defined as $2^a3^b-3^d+1$, and it can then be determined whether this second idempotent can be expressed as $2^c$. Since it is known that there are no solutions larger than $145$ (see answer by Mike Bennett), I do not press my search well beyond that limit.

Case 1; $a=1 \rightarrow 2\cdot 3^b$. For $d \ge b$ it is the case that $3^d \equiv 0 \bmod 3^b \land 3^d \equiv 1 \bmod 2 $, so $3^d$ is in general a possible idempotent for $2\cdot 3^b$. It is also required that $d < b+\log_3(2)$. This requires $d=b$. The second idempotent is identified as $2\cdot 3^b-3^b+1=3^b+1$. We are looking for circumstances where $3^b+1=2^c$, and by Catalan’s conjecture this is only possible for $b=d=1,c=2$, which yields the example $2\cdot 3+1=2^2+3^1=7$.

Case 2; $a=2 \rightarrow 4\cdot 3^b$. For $d=2r \ge b$ it is the case that $3^{2r} \equiv 0 \bmod 3^b \land 3^{2r} \equiv 1 \bmod 4$, so $3^{2r}$ is a possible idempotent for $4\cdot 3^b$. It is also required that $d=2r < b+\log_3(4)$. This requires either $d=2r=b$ ($b$ even) or $d=2r=b+1$ ($b$ odd). The second idempotent is identified as either $4\cdot 3^b-3^b+1=3^{b+1}+1$ or $4\cdot 3^b-3^{b+1}+1=3^b+1$ . Equating the first of these to $2^c$ requires $b=0$, which is not relevant here; the second gives the results $b=1,c=2,d=2$, which yields the example $4\cdot 3+1=2^2+3^2=13$.

Case 3; $a=3 \rightarrow 8\cdot 3^b$. For $d=2r \ge b$ it is the case that $3^{2r} \equiv 0 \bmod 3^b \land 3^{2r} \equiv 1 \bmod 8$, so $3^{2r}$ is a possible idempotent for $8\cdot 3^b$. It is also required that $d=2r < b+\log_3(8)$. This requires either $d=2r=b$ or $d=2r=b+1$. The second idempotent is identified as either $8\cdot 3^b-3^b+1=7\cdot 3^b +1$ or $8\cdot 3^b-3^{b+1}+1=5\cdot 3^b+1$. Equating these to $2^c$ gives the results $b=d=2,c=6$ and $b=1,c=4,d=2$, which yield the examples $8\cdot 3^2+1=2^6+3^2=73$ and $8\cdot 3+1=2^4+3^2=25$.

Case 4; $a=4 \rightarrow 16\cdot 3^b$. For $d=4r \ge b$ it is the case that $3^{4r} \equiv 0 \bmod 3^b \land 3^{4r} \equiv 1 \bmod 16$, so $3^{4r}$ is a possible idempotent for $16\cdot 3^b$. It is also required that $d=4r < b+\log_3(16)$. This requires either $d=4r=b$, $d=4r=b+1$, or $d=4r=b+2$. The second idempotent is one of: $16\cdot 3^b-3^b+1=15\cdot 3^b+1=5\cdot 3^{b+1}+1$; or, $16\cdot 3^b-3^{b+1}+1=13\cdot 3^b +1$; or, $16\cdot 3^b-3^{b+2}+1=7\cdot 3^b+1$. Only the last of these gives a solution, $b=2,c=6,d=4$, which yields the example $16\cdot 3^2+1=2^6+3^4=145$.

Case 5; $a=5 \rightarrow 32\cdot 3^b$. Here I merely note that for exponents $a \ge 5$, it must be the case that $d\ge 8r$, and the term $3^d$ for $d \ge 8$ is much larger than $145$, which is the largest possible solution (see the answer of Mike Bennett). So I stop here.

In a comment, Robert Israel identified $7,13,19,25,73,97,145$ as solutions, confirmed by the answer of Mike Bennett. The analysis of idempotents identified $7,13,25,73,145$ as solutions, missing $16+3=19 \text{ and } 16+81=97$. This is not an error in the analytic approach: the idempotents of $18$ are $9,10$ and the idempotents of $96$ are $33,64$. I have no systematic explanation for these non-idempotent solutions.