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.

A268514 a(0)=0; thereafter a(2n+1)=3*a(n)+1, a(2n)=2*a(n)+a(n-1)+1.

Original entry on oeis.org

0, 1, 3, 4, 8, 10, 12, 13, 21, 25, 29, 31, 35, 37, 39, 40, 56, 64, 72, 76, 84, 88, 92, 94, 102, 106, 110, 112, 116, 118, 120, 121, 153, 169, 185, 193, 209, 217, 225, 229, 245, 253, 261, 265, 273, 277, 281, 283, 299, 307, 315, 319, 327, 331, 335, 337
Offset: 0

Views

Author

N. J. A. Sloane, Feb 07 2016

Keywords

Crossrefs

Cf. A064194, A023416 (no. of 0's in n).
First differences are (essentially) A080100.

Programs

  • PARI
    a(n) = sum(i=1, n, b=binary(i); 2^(#b-norml2(b))) \\ Colin Barker, Feb 08 2016

Formula

a(n) = Sum{i=1..n} 2^{number of 0's in binary expansion of i}.
a(n) = (A064194(n+1)-1)/2.