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.

A104234 Number of k >= 1 such that k+n == 0 mod 2^k.

Original entry on oeis.org

0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 2, 1, 2, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 2, 2, 1, 2, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 2, 1, 2, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1
Offset: 0

Views

Author

N. J. A. Sloane, Apr 02 2005

Keywords

Comments

Number of terms in the summation in the formula for A102370(n).
Also, a(n) is the number of 1's in (A103185(n) written in base 2).

Crossrefs

Cf. A102370, A103185, A105035 (records).

Programs

  • Maple
    f:=proc(n) local t1,l; t1:=0; for l from 1 to n do if n+l mod 2^l = 0 then t1:=t1+1; fi; od: t1; end;

Formula

a(2^k + y) = a(y) + 1 if y = 2^k - k - 1, = a(y) otherwise (where 0 <= y <= 2^k - 1).