OFFSET
0,1
COMMENTS
Since arbitrarily large prime gaps occur, several consecutive zeros may arise in the sequence.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
EXAMPLE
n=0: only 13+2=15 integers correspond to the condition: {11,17,29,41,59,71,101,107,137,149,179,191,197}, so a[0]=13; see A078859.
n=11: only 2 twins were found, {2339,2341} and {2381,2383} corresponding to residue pairs {29,31} and {71,73}.
MATHEMATICA
{k =0, ta=Table[0, {100}]}; Do[{m=0}; Do[s=210k+r; s1=210k+r+2; If[PrimeQ[s]&&PrimeQ[s+2], m=m+1], {r, 1, 210}]; ta[[k]]=m, {k, 1, 100}]; ta
(* Second program: *)
With[{P = Product[Prime@ i, {i, 4}]}, Function[R, Array[Count[R + P #, k_ /; Times @@ Boole@ PrimeQ@ {k, k + 2} == 1] &, 105, 0]]@ Select[Partition[Select[Range[P + 1], CoprimeQ[#, P] &], 2, 1], Differences@ # == {2} &][[All, 1]]] (* Michael De Vlieger, May 15 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer and Enoch Haga, Jun 15 2004
STATUS
approved