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!)
A323162 a(n) = 1 if both n and n-1 are composite, 0 otherwise. 4

%I #10 Jan 08 2019 19:07:09

%S 0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,0,0,1,1,

%T 1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,

%U 1,1,0,0,0,0,1,1,1,1,0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,0,0,0,1

%N a(n) = 1 if both n and n-1 are composite, 0 otherwise.

%C Characteristic function of A005381.

%H Antti Karttunen, <a href="/A323162/b323162.txt">Table of n, a(n) for n = 1..65537</a>

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

%F a(1) = 0; for n > 1, a(n) = (1-A010051(n-1)) * (1-A010051(n)).

%F a(A005381(n)) = 1, a(A093515(n)) = 0.

%F For n >= 4, a(n) = 1-A090405(n-2).

%t Map[Boole[AllTrue[#, CompositeQ]] &, Partition[Range[0, 120], 2, 1]] (* _Michael De Vlieger_, Jan 07 2019 *)

%o (PARI) A323162(n) = ((n>1)&&(!isprime(n))&&(!isprime(n-1)));

%Y Cf. A005381, A010051, A090405, A093515, A323161.

%K nonn

%O 1

%A _Antti Karttunen_, Jan 07 2019

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 April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)