cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A323698 Primes of the form 3^j - 2^k, for j>=0, k>=0.

Original entry on oeis.org

2, 5, 7, 11, 17, 19, 23, 73, 79, 139, 179, 211, 227, 239, 241, 601, 727, 1163, 1931, 2179, 3299, 4513, 6529, 6553, 11491, 19427, 19681, 50857, 58537, 58921, 111611, 144379, 176123, 177019, 177131, 529393, 545747, 1593299, 1594259, 2685817, 4782961, 9492289, 14346859
Offset: 1

Views

Author

Jinyuan Wang, Jan 24 2019

Keywords

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.

Examples

			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.
		

Crossrefs

Cf. A007643 (Primes not of form |3^x - 2^y|).
Cf. A321671 (Primes of the form 2^j - 3^k).

Programs

  • 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]]
  • PARI
    forprime(p=1, 1000, k=0; x=3; y=1; while(k
    				

Formula

Intersection of A000040 and A192111.