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.

A230300 a(n) = n + wt(n-1), where wt() = A000120() is the binary weight.

Original entry on oeis.org

1, 3, 4, 6, 6, 8, 9, 11, 10, 12, 13, 15, 15, 17, 18, 20, 18, 20, 21, 23, 23, 25, 26, 28, 27, 29, 30, 32, 32, 34, 35, 37, 34, 36, 37, 39, 39, 41, 42, 44, 43, 45, 46, 48, 48, 50, 51, 53, 51, 53, 54, 56, 56, 58, 59, 61, 60, 62, 63, 65, 65, 67, 68, 70, 66, 68, 69, 71, 71, 73, 74, 76, 75, 77, 78, 80, 80, 82, 83, 85, 83, 85
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2013

Keywords

Comments

A228085(m-1) gives the number of times m occurs in this sequence.

Crossrefs

Cf. A000120, A092391, A228085, A230301 (complement).

Programs

  • Maple
    a:= n-> n+add(i,i=Bits[Split](n-1)):
    seq(a(n), n=1..82);  # Alois P. Heinz, Jul 05 2024
  • Mathematica
    Table[n+Total[IntegerDigits[n-1,2]],{n,100}] (* Harvey P. Dale, May 20 2015 *)
  • PARI
    a(n) = n + hammingweight(n-1); \\ Michel Marcus, Jul 05 2024