OFFSET
1,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(4)= 10 because between the 4th and 5th prime triples there are 10 primes: (41,43,47) 53, 59 61, 67, 71, 73, 79, 83, 89, 97 (101,103,107).
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 then i:=i+1:else fi:od: printf(`%d, `, i):od:
MATHEMATICA
If[#>0, #-1, #]&/@(PrimePi[#[[1]]]-PrimePi[#[[2]]]&/@({#[[2, 1]], #[[1, 3]]}&/@ Partition[Select[Partition[Prime[Range[2000]], 3, 1], Differences[#]=={2, 4}&], 2, 1])) (* Harvey P. Dale, Jun 08 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jun 29 2012
STATUS
approved