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.

A214913 a(n+1) = a(n) + max(1, count0s), where count0s is number of 0's in binary representation of a(n).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 11, 12, 14, 15, 16, 20, 23, 24, 27, 28, 30, 31, 32, 37, 40, 44, 47, 48, 52, 55, 56, 59, 60, 62, 63, 64, 70, 74, 78, 81, 85, 88, 92, 95, 96, 101, 104, 108, 111, 112, 116, 119, 120, 123, 124, 126, 127, 128, 135, 139, 143, 146, 151, 154, 158
Offset: 1

Views

Author

Alex Ratushnyak, Aug 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    NestList[#+Max[1,DigitCount[#,2,0]]&,0,70] (* Harvey P. Dale, Apr 21 2016 *)
  • Python
    a = 0
    for n in range(100):
        print(a, end=', ')
        ta = a
        c0 = (a==0)
        while ta>0:
            c0 += 1-(ta&1)
            ta >>= 1
        a += max(c0,1)

Formula

a(0) = 0, a(n+1) = a(n) + max(1, A023416(a(n))). - David Radcliffe, Jun 05 2025