OFFSET
1,1
COMMENTS
In this sequence, only 5 and 17 make both j and k even numbers.
Generally, the way to prove that a number is not in this sequence is to successively take residues modulo 3, 8, 5, and 16 on both sides of the equation 3^j - 2^k = x.
EXAMPLE
11 = 3^3 - 2^4, so 11 is a term.
41 == 1 (mod 8), 41 == 2 (mod 3), so j = 2*l, k = 2*m. 41 == 1 (mod 5), but 3^(2*l) - 2^(2*m) mod 5 is 0, 2 or 3. So 41 is not in this sequence.
MATHEMATICA
c = 3; d = 2; t[i_, j_] := c^i - d^j;
u = Table[If[PrimeQ[t[i, j]] == True, u = t[i, j]], {i, 0, 20}, {j, 0, i*Log[d, c]}];
v = Union[Flatten[u]]
PROG
(PARI) forprime(p=1, 1000, k=0; x=3; y=1; while(k<p+1, while(x<y+p, x=3*x); if(x-y==p, print1(p, ", "); k=p); k++; y=2*y))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Jan 24 2019
STATUS
approved