OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1)=0 (-2,-1 and 1 are nonprime, 2 is prime); a(2)=2 (0,1 and 4 are nonprime, 3 is prime); a(3)=7 (6,8 and 9 are nonprime, 5 is prime); a(4)=10 (8,9 and 12 are nonprime, 11 is prime); a(5)=11 (9,10 and 12 are nonprime, 13 is prime).
MATHEMATICA
Join[{0}, Select[Range[120], Total[Boole[PrimeQ[#+{-2, -1, 1, 2}]]]==1&]] (* Harvey P. Dale, Apr 09 2020 *)
PROG
(PARI) is(n)=isprime(n-2)+isprime(n-1)+isprime(n+1)+isprime(n+2)==1 \\ Charles R Greathouse IV, Jun 13 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Nov 18 2009
STATUS
approved