OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..2000
MAPLE
a:=[];
for k from 0 to 5000 do
if not isprime(k) then
if (isprime(k-1) and isprime(k+1)) or
(not isprime(k-1) and not isprime(k+1)) then a:=[op(a), k]; fi; fi; od:
a; # N. J. A. Sloane, Sep 23 2019
MATHEMATICA
bpQ[n_]:=!PrimeQ[n]&&EvenQ[Total[If[PrimeQ[#], 1, 0]&/@{n-1, n+1}]]; Select[ Range[ 0, 150], bpQ] (* Harvey P. Dale, Sep 23 2019 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Jan 21 2010
EXTENSIONS
Edited by Charles R Greathouse IV, Mar 23 2010
Definition and data corrected by N. J. A. Sloane, Sep 23 2019. Thanks to Harvey P. Dale for pointing that there were errors. - N. J. A. Sloane, Sep 23 2019
STATUS
approved