A100319 Even numbers m such that at least one of m-1 and m+1 is composite.
8, 10, 14, 16, 20, 22, 24, 26, 28, 32, 34, 36, 38, 40, 44, 46, 48, 50, 52, 54, 56, 58, 62, 64, 66, 68, 70, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 104, 106, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 140, 142, 144, 146, 148
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A100318 (supersequence containing odd and even n), A045718 (n such that at least one of n-1 and n+1 is prime).
Cf. A167692(the even nonisolated nonprimes). - Juri-Stepan Gerasimov, Nov 09 2009
Programs
-
Mathematica
Select[2*Range[100], CompositeQ[#-1] || CompositeQ[#+1] &] (* G. C. Greubel, Mar 09 2019 *)
-
PARI
forstep(n=4,300,2,if(isprime(n-1)+isprime(n+1)<=1,print1(n,",")))
-
Sage
[n for n in (3..250) if mod(n,2)==0 and (is_prime(n-1) + is_prime(n+1)) < 2] # G. C. Greubel, Mar 09 2019
Formula
a(n) = A167692(n+1). - Juri-Stepan Gerasimov, Nov 09 2009
Comments