OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n) ~ 6n/log n. -Charles R Greathouse IV, May 25 2011
EXAMPLE
a(1)=-1 (-4,-3,-2,0 and 1 are nonprimes, 2 is prime);
a(2)=7 (4,6,8,9 and 10 are nonprimes, 5 is prime);
a(3)=13 (8,9,10,12 and 14 are nonprimes, 11 is prime).
MATHEMATICA
f[n_] := Length[Select[Drop[Range[n - 3, n + 3], {4}], PrimeQ]] == 1; Join[{-1}, Select[Range[0, 200], f]] (* G. C. Greubel, Jul 09 2016 *)
Join[{-1}, Select[Range[200], Total[Boole[PrimeQ[Drop[Range[#-3, #+3], {4}]]]]==1&]] (* Harvey P. Dale, Oct 16 2018 *)
PROG
(PARI) is(n)=isprime(n-3) + isprime(n-2) + isprime(n-1) + isprime(n+1) + isprime(n+2) + isprime(n+3) == 1 \\ Charles R Greathouse IV, Jun 13 2017
CROSSREFS
KEYWORD
sign
AUTHOR
Juri-Stepan Gerasimov, Nov 18 2009
EXTENSIONS
Corrected (11, 57 inserted, 16 replaced by 126) by R. J. Mathar, Jun 04 2010
STATUS
approved