login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A212361
Number of primes between two consecutive prime triples (p, p+2, p+6).
1
0, 0, 3, 10, 0, 12, 3, 12, 2, 17, 24, 23, 3, 1, 27, 21, 3, 10, 6, 0, 14, 30, 13, 8, 16, 1, 45, 3, 65, 23, 5, 17, 27, 6, 13, 43, 9, 15, 12, 3, 28, 25, 0, 14, 59, 70, 114, 18, 13, 5, 21, 37, 60, 1, 93, 5, 1, 71, 54, 36, 86, 7, 67, 6, 9, 0, 15, 16, 30, 108, 7, 31
OFFSET
1,3
LINKS
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
Sequence in context: A137044 A188545 A336747 * A011998 A278759 A280752
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jun 29 2012
STATUS
approved