Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A086137
Number of primes between p and p+8 if p is prime, i.e., number of primes between 8+A023202(n) and A023202(n).
0
2, 2, 2, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 2, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 2, 0, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 2, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 1, 0, 2, 0, 1, 1, 0, 0, 0, 1, 0, 1
OFFSET
1,1
EXAMPLE
a(n)=0,1,2 correspond to {p,p+8} prime-pairs either consecutive or pairs with various d-patterns as follows:
a(n)=0 to 89[8]97; a(n)=1 for 29[2,6]37, 53[6,2];
a(n)=2 for 101[2,4,2]109 and once to 3[2,2,4]11.
MATHEMATICA
cp[x_, y_] := Count[Table[PrimeQ[i], {i, x, y}], True] Do[s=Prime[n]; s1=Prime[n+1]; If[PrimeQ[s+d], k=k+1; Print[cp[s+1, s+d-1]]], {n, 1, 1000}]; k
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 29 2003
STATUS
approved