cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A066247 Characteristic function of composite numbers: 1 if n is composite else 0.

This page as a plain text file.
%I A066247 #48 Feb 09 2024 10:10:59
%S A066247 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,
%T A066247 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,
%U A066247 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
%N A066247 Characteristic function of composite numbers: 1 if n is composite else 0.
%C A066247 a(n) = signum(A066246(n)), where signum = A057427. For n > 1: a(n) = 1 - A010051(n) = A005171(n).
%C A066247 a(n) = A057427(A086971(n)). - _Reinhard Zumkeller_, Dec 14 2012
%H A066247 Antti Karttunen, <a href="/A066247/b066247.txt">Table of n, a(n) for n = 1..65537</a>
%H A066247 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%H A066247 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F A066247 For n>1 a(n) = 1-floor(1/A001222(n)). - _Enrique Pérez Herrero_, Aug 08 2012
%F A066247 a(n) = A065855(n)-A065855(n-1) = 1-A000720(n)+A000720(n-1). - _Chayim Lowen_, Jul 23 2015
%F A066247 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
%F A066247 a(n) = 1 if A001222(n) > 1, 0 otherwise. - _Antti Karttunen_, Nov 20 2017
%t A066247 A066247[n_]:=1-Boole[PrimeQ[n]]-KroneckerDelta[n, 1] (* _Enrique Pérez Herrero_, Oct 13 2010 *)
%t A066247 Table[Boole[CompositeQ[n]], {n, 1, 105}] (* _Jean-François Alcover_, Jan 25 2018 *)
%o A066247 (PARI) a(n)=!isprime(n)&&n>1 \\ _Charles R Greathouse IV_, Aug 21 2011
%o A066247 (Haskell)
%o A066247 a066247 1 = 0
%o A066247 a066247 n = 1 - a010051 n  -- _Reinhard Zumkeller_, Feb 04 2012
%Y A066247 Cf. A001222, A002808, A010051, A005171.
%Y A066247 Cf. A065855 (partial sums).
%K A066247 nonn,easy
%O A066247 1,1
%A A066247 _Reinhard Zumkeller_, Dec 09 2001