OFFSET
1,1
COMMENTS
Smallest prime preceded by 2n-1 successive composites. - Lekraj Beedassy, Apr 23 2010
REFERENCES
J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 97, p. 34, Ellipses, Paris 2008.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n = 1..595 (from Nicely)
L. J. Lander and T. R. Parkin, On the first appearance of prime differences, Math. Comp., 21 (1967), 483-488.
Thomas R. Nicely, First occurrence prime gaps [For local copy see A000101]
FORMULA
EXAMPLE
MATHEMATICA
With[{pr=Partition[Prime[Range[35000]], 2, 1]}, Transpose[ Flatten[ Table[ Select[pr, #[[2]]-#[[1]]==2n&, 1], {n, 40}], 1]][[2]]] (* Harvey P. Dale, Apr 20 2012 *)
PROG
(PARI) LIMIT=10^9; a=[]; i=2; o=2; g=0; forprime(p=3, LIMIT, bittest(g, -o+o=p) && next; a=concat(a, [[p, p-precprime(p-1)]]); g+=1<<a[#a][2]; a=vecsort(a, 2); while(#a>=i && a[i][2]<2*i, print1(a[i][1]", "); i++)) \\ a[1] = [3, 1] is not printed, cf. A000230(0). Limit 10^7 yields a(1), ..., a(70) in 0.3 sec @ 2.5 GHz. \\ M. F. Hasler, Jan 13 2011, updated Jan 26 2015.
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Nov 28 2000 and from Labos Elemer, Nov 29 2000
Terms a(1)-a(146) checked with the PARI program by M. F. Hasler, Jan 13 2011, Jan 26 2015
STATUS
approved