OFFSET
1,4
EXAMPLE
a(6)= 3 because between the 6th and 7th prime triples there are 3 twin prime pairs : (107,109,113), (137,139), (149,151), (179,181), (191,193,197).
MAPLE
with(numtheory):T:=array(1..1000):k:=1:for n from 1 to 4000 do:p:=ithprime(n):if type(p+2, prime)=true and type(p+6, prime) = true then T[k]:=p:T[k+1]:=p+6:k:=k+2:else fi:od:for m from 2 by 2 to k-2 do: p1:= T[m]:p2:=T[m+1]:i:=0:for q from p1+1 to p2-1 do:if type(q, prime)=true and type(q+2, prime) = true and q+2 <>p2 then i:=i+1:else fi:od: printf(`%d, `, i):od:
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jun 30 2012
STATUS
approved