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.

A219528 Primes neighboring a 3-smooth number.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 31, 37, 47, 53, 71, 73, 97, 107, 109, 127, 163, 191, 193, 257, 383, 431, 433, 487, 577, 647, 769, 863, 971, 1151, 1153, 1297, 1459, 2591, 2593, 2917, 3457, 3889, 4373, 6143, 6911, 8191, 8747, 10369, 12289, 13121, 15551, 17497, 18433, 23327, 27647, 39367, 52489, 62207, 65537, 73727
Offset: 1

Views

Author

Lei Zhou, Nov 21 2012

Keywords

Comments

Prime numbers of the form of 2^j*3^k +/- 1, which may be called "near-3-smooth primes".
Such prime numbers can often be proved prime by OpenPFGW.

Examples

			a(1)=2=1+1, where A003586(1)=1;
a(2)=3=2+1, where A003586(2)=2;
...
a(59)=73727=2^13*3^2-1, where A003586(97)=2^13*3^2=73728.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p2, p3 = 3^Range[0, Floor@ Log[3, n] + 1]}, p2 = 2^Floor[Log[2, n/p3] + 1]; Min[ Select[ p2*p3, IntegerQ]]];
    a={};ct=0;tsm=1;While[ct<59,cp=tsm-1;If[(PrimeQ[cp])&&(!MemberQ[a,cp]),a=Append[a,cp];ct++];cp=cp+2;If[(PrimeQ[cp])&&(!MemberQ[a,cp]),a=Append[a,cp];ct++];tsm=f[tsm]];Print[a]
  • PARI
    list(lim)=my(v=List([2]), N); for(n=0, log(lim\2)\log(3), N=2*3^n; while(N<=lim, if(ispseudoprime(N-1),listput(v, N-1)); if(ispseudoprime(N+1), listput(v, N+1)); N<<=1)); vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Nov 21 2012