A219528 Primes neighboring a 3-smooth number.
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
Keywords
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.
Links
- Lei Zhou, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A003586
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
Comments