login
This site is supported by donations 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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1

COMMENTS

Characteristic function of A005381.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..65537

Index entries for characteristic functions

FORMULA

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

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

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

MATHEMATICA

Map[Boole[AllTrue[#, CompositeQ]] &, Partition[Range[0, 120], 2, 1]] (* Michael De Vlieger, Jan 07 2019 *)

PROG

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

CROSSREFS

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

Sequence in context: A011722 A276404 A277153 * A295883 A295662 A187946

Adjacent sequences:  A323159 A323160 A323161 * A323163 A323164 A323165

KEYWORD

nonn

AUTHOR

Antti Karttunen, Jan 07 2019

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 19 10:23 EST 2019. Contains 320310 sequences. (Running on oeis4.)