OFFSET
3,1
COMMENTS
Run the PARI script savetwins(100000) or so to build the twinprime array of lower bounds before you run the main script.
Except for first term, same as A053778. - David Wasserman, Feb 22 2006
LINKS
Harvey P. Dale, Table of n, a(n) for n = 3..1000
EXAMPLE
Twin prime pairs 5,7 and 11,13 contain only the composite numbers 6,7,8,9,10 between them. So 5 is in the table. 11,13 and 17,19 have no primes between.
11 is in the table. 41,43 and 59,61 have primes 47 and 53 between then so 41 is not listed.
MATHEMATICA
Join[{3}, Select[Partition[Prime[Range[1500]], 4, 1], #[[4]]-#[[3]]==#[[2]]- #[[1]] == 2&][[All, 1]]] (* Harvey P. Dale, Dec 15 2018 *)
PROG
(PARI) \save as twinpr.gp pbetweentw(n) = { forstep(x1=1, n, 2, c=0; t1 = twin[x1]; t2 = twin[x1+2]; for(y=t1+3, t2-1, if(isprime(y), c++) ); if(c==0, print1(t1", ")) ) } savetwins(n) = build a table of twin prime I want to upload a supporting file to store with the OEIS and add a link to it.lower bounds { twin = vector(n); c=1; forprime(x=3, n, if(isprime(x+2), twin[c]=x; c++; ) ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Jan 01 2004
STATUS
approved