OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
npsQ[n_]:=SquareFreeQ[n]&&NoneTrue[n+{1, 0, -1}, PrimeQ]&&NoneTrue[n+{1, -1}, SquareFreeQ]; Select[Range[2000], npsQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 20 2019 *)
Mean/@SequencePosition[Table[Which[CompositeQ[n]&&SquareFreeQ[n], 1, !SquareFreeQ[ n] && CompositeQ[ n], -1, True, 0], {n, 1100}], {-1, 1, -1}] (* Harvey P. Dale, Jun 17 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 22 2002
EXTENSIONS
Corrected by Harvey P. Dale, Jan 20 2019
STATUS
approved