OFFSET
0,1
MATHEMATICA
tpe[n_]:=Module[{k=1}, While[Count[Range[n-k, n+k], _?PrimeQ]<2, k++]; k]; Join[{3}, Array[tpe, 100]] (* Harvey P. Dale, Aug 22 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 07 2004
STATUS
approved