login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A133478
a(n) = smallest semiprime s such that s + n is the next semiprime and there is no prime between s and s + n.
5
9, 49, 62, 403, 341, 843, 6722, 3473, 2869, 14059, 18467, 26603, 166126, 41779, 74491, 192061, 463161, 226489, 344119, 517421, 943606, 2171131, 4577519, 584213, 2560177, 4356633, 8367139, 11174753, 13191293, 7319797, 27841051, 10644122, 13683034, 29492893, 47735342, 26837363, 63305661, 90455097, 189662206, 120175651
OFFSET
1,1
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..60.
EXAMPLE
a(1)=9 because there is no prime between 9 and 10.
a(2)=49 because there is no prime between 49 and 51.
a(3)=62 because there is no prime between 62 and 65.
MATHEMATICA
nn = 20; sp1 = 4; t = Table[0, {nn}]; found = 0; fQ[s_] := Union@ PrimeQ[s] == {False}; NextSemiPrime[n_, k_: 1] := Block[{c = 0, sgn = Sign[k]}, sp = n + sgn; While[c < Abs[k], While[ PrimeOmega[sp] != 2, If[sgn < 0, sp--, sp++]]; If[ sgn < 0, sp--, sp++]; c++]; sp + If[sgn < 0, 1, -1]]; While[found < nn, sp2 = NextSemiPrime[sp1]; d = sp2 - sp1; If[d <= nn && t[[d]] == 0 && fQ[Range[sp1, sp2]], t[[d]] = sp1; found++; Print[{d, sp1}]]; sp1 = sp2]; t (* Robert G. Wilson v, Jun 13 2013 *)
CROSSREFS
Sequence in context: A181607 A012260 A262537 * A339129 A340239 A032589
KEYWORD
nonn
AUTHOR
Jack Brennen and Zak Seidov, Dec 23 2007
EXTENSIONS
a(37)-a(40) from Jacques Tramu, Dec 23 2007
STATUS
approved