OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Range[6! ], !PrimeQ[ #-1]&&!PrimeQ[ #+1]&] (* Vladimir Joseph Stephan Orlovsky, Apr 26 2010 *)
Select[Range[120], AllTrue[#+{1, -1}, CompositeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 10 2018 *)
Mean/@SequencePosition[Table[If[CompositeQ[n], 1, 0], {n, 120}], {1, _, 1}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 23 2019 *)
PROG
(PARI) for(n=5, 200, if(!isprime(n-1)&&!isprime(n+1), print1(n, ", ")))
(Haskell)
a099047 n = a099047_list !! (n-1)
a099047_list = [m | m <- [1..],
a010051' (m - 1) == 0 && a010051' (m + 1) == 0]
-- Reinhard Zumkeller, Aug 04 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Rick L. Shepherd, Nov 13 2004
STATUS
approved