The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A151774 Characteristic function of numbers with binary weight 2 (A018900). 5
 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS a(A018900(n)) = 1; a(A161989(n)) = 0. - Reinhard Zumkeller, Jun 24 2009 LINKS R. Zumkeller, Table of n, a(n) for n = 0..10000 FORMULA Let Theta = Sum_{k >= 0} x^(2^k). G.f. is (x + Theta^2 - Theta)/2 (cf. A151758). MATHEMATICA w[n_] := IntegerDigits[n, 2] // Total; a[n_] := Boole[w[n] == 2]; a /@ Range[0, 105] (* Jean-François Alcover, Mar 31 2021 *) PROG (PARI) a(n)=hammingweight(n)==2 \\ Charles R Greathouse IV, Sep 26 2015 CROSSREFS Cf. A000120, A018900, A151758. Sequence in context: A341612 A252742 A066247 * A095792 A288381 A169675 Adjacent sequences:  A151771 A151772 A151773 * A151775 A151776 A151777 KEYWORD nonn,easy AUTHOR N. J. A. Sloane, Jun 23 2009 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.

Last modified April 16 07:59 EDT 2021. Contains 343030 sequences. (Running on oeis4.)