The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A161996 A (negated) characteristic function of twin composite odd numbers. 1

%I #11 Dec 16 2017 05:31:55

%S 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,

%T 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,

%U 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

%N A (negated) characteristic function of twin composite odd numbers.

%C a(n) = 0 if n is a member of A060461, otherwise a(n) = 1.

%H Antti Karttunen, <a href="/A161996/b161996.txt">Table of n, a(n) for n = 1..37317</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%t 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 *)

%o (PARI) A161996(n) = (isprime((6*n)-1)||isprime((6*n)+1)); \\ _Antti Karttunen_, Dec 15 2017

%Y Cf. A060461, A100923.

%K nonn,easy

%O 1,1

%A _Pierre CAMI_, Jun 24 2009

%E Definition rephrased by _R. J. Mathar_, Aug 14 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 05:46 EDT 2024. Contains 372538 sequences. (Running on oeis4.)