OFFSET
1,1
COMMENTS
Or a=p+1, b=p+2 and c=p+3 are composite triples: a,b,c are composite while a-1 and c+1 are not. There are no composite twins and composite singles are interprimes of twin primes. All numbers are congruent to 1 mod 6 (and not congruent to 1 mod 10). First differences divided by 6 are: 5,2,3,5,6,10,9,5,12,3,7,3,5,2,19,10,11,3,2,14,4,5,5,5,7,13,21,14,21,4,17,...
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1)=37 because nextprime(37)=41=37+4 and previousprime(37)=31<37-4,
a(2)=67 because nextprime(67)=71=67+4 and previousprime(67)=61<67-4.
MATHEMATICA
p1000=Prime[Range[1000]]; c=0; Do[p=p1000[[i]]; If[p-p1000[[i-1]]>4&&p1000[[i+1]]==4+p, c++; a[c]=p], {i, 2, 999}]; Table[a[i], {i, c}]
Select[Prime[Range[400]], NextPrime[#]-#==4&&#-NextPrime[#, -1]>4&] (* Harvey P. Dale, Jul 16 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Aug 12 2007
STATUS
approved