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.

A132680 Number of ones in binary representation of odious numbers.

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 5, 1, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 5, 3, 5, 5, 5, 1, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 5, 3, 5, 5, 5, 3, 3, 3, 5, 3, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5, 7, 1, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 5, 3, 5, 5, 5, 3, 3, 3, 5, 3, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5, 7, 3, 3, 3, 5, 3, 5, 5, 5, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 26 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Select[DigitCount[Range[200], 2, 1], OddQ] (* Amiram Eldar, Jul 22 2023 *)
  • PARI
    a(n)=hammingweight(2*n-1-hammingweight(n-1)%2) \\ Charles R Greathouse IV, Mar 26 2013

Formula

a(n) = a(floor(n/2)) + 2*(n mod 2)*(1-A010060(n)).
a(n) = A000120(A000069(n)).
a(A129771(n)) = a((A129771(n)-1)/2) + 2.
a(A083420(n)) = A005408(n).