OFFSET
1,1
MATHEMATICA
Select[Range[120], AllTrue[#+{1, -1}, CompositeQ]||AllTrue[#+{1, -1}, PrimeQ]&] (* Harvey P. Dale, Sep 01 2021 *)
PROG
(PARI) for(n=3, 200, s=isprime(n-1)+isprime(n+1); if(s<>1, print1(n, ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Rick L. Shepherd, Nov 13 2004
STATUS
approved