A161996 A (negated) characteristic function of twin composite odd numbers.
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1
Offset: 1
Links
Programs
-
Mathematica
If[AllTrue[6#+{1,-1},CompositeQ],0,1]&/@Range[300] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 15 2015 *)
-
PARI
A161996(n) = (isprime((6*n)-1)||isprime((6*n)+1)); \\ Antti Karttunen, Dec 15 2017
Extensions
Definition rephrased by R. J. Mathar, Aug 14 2009
Comments