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!)
A066247 Characteristic function of composite numbers: 1 if n is composite else 0. 32
0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) = signum(A066246(n)), where signum = A057427. For n > 1: a(n) = 1 - A010051(n) = A005171(n).
a(n) = A057427(A086971(n)). - Reinhard Zumkeller, Dec 14 2012
LINKS
FORMULA
For n>1 a(n) = 1-floor(1/A001222(n)). - Enrique Pérez Herrero, Aug 08 2012
a(n) = A065855(n)-A065855(n-1) = 1-A000720(n)+A000720(n-1). - Chayim Lowen, Jul 23 2015
Dirichlet g.f.: Sum_{n>=1} a(n)/n^s = Zeta(s)-1-P(s), where P is prime zeta. - Enrique Pérez Herrero, Aug 08 2012
a(n) = 1 if A001222(n) > 1, 0 otherwise. - Antti Karttunen, Nov 20 2017
MATHEMATICA
A066247[n_]:=1-Boole[PrimeQ[n]]-KroneckerDelta[n, 1] (* Enrique Pérez Herrero, Oct 13 2010 *)
Table[Boole[CompositeQ[n]], {n, 1, 105}] (* Jean-François Alcover, Jan 25 2018 *)
PROG
(PARI) a(n)=!isprime(n)&&n>1 \\ Charles R Greathouse IV, Aug 21 2011
(Haskell)
a066247 1 = 0
a066247 n = 1 - a010051 n -- Reinhard Zumkeller, Feb 04 2012
CROSSREFS
Cf. A065855 (partial sums).
Sequence in context: A106002 A341612 A252742 * A151774 A095792 A288381
KEYWORD
nonn,easy,changed
AUTHOR
Reinhard Zumkeller, Dec 09 2001
STATUS
approved

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 February 22 05:23 EST 2024. Contains 370239 sequences. (Running on oeis4.)