cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A214000 Number of twin prime pairs between two consecutive prime triples (p, p+2, p+6).

Original entry on oeis.org

0, 0, 1, 2, 0, 3, 0, 3, 0, 2, 4, 2, 0, 0, 4, 2, 1, 1, 1, 0, 0, 5, 2, 1, 3, 0, 5, 0, 8, 5, 0, 3, 3, 1, 3, 9, 1, 2, 1, 0, 3, 3, 0, 2, 6, 12, 14, 2, 1, 0, 2, 4, 8, 0, 13, 0, 0, 10, 5, 5, 7, 0, 4, 2, 1, 0, 3, 1, 5, 7, 0, 2, 0, 1, 9, 3, 13, 3, 4, 5, 0, 7, 5, 4, 2
Offset: 1

Views

Author

Michel Lagneau, Jun 30 2012

Keywords

Examples

			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).
		

Crossrefs

Programs

  • 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:
Showing 1-1 of 1 results.