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.

A319142 Total number of binary digits in the partitions of n into odd parts.

Original entry on oeis.org

1, 2, 5, 7, 12, 19, 26, 36, 52, 71, 92, 124, 158, 204, 265, 331, 413, 522, 641, 791, 976, 1184, 1435, 1741, 2093, 2506, 3005, 3574, 4237, 5030, 5928, 6971, 8202, 9593, 11212, 13087, 15210, 17653, 20472, 23665, 27308, 31488, 36205, 41570, 47701, 54584, 62387
Offset: 1

Views

Author

David S. Newman, Sep 11 2018

Keywords

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; 1+ilog2(n) end:
    b:= proc(n, i) option remember; `if`(n=0, [1, 0],
          `if`(i<1, 0, b(n, i-1-irem(i, 2))+`if`(i::even
           or i>n, 0, (p-> p+[0, p[1]*h(i)])(b(n-i, i)))))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=1..60);  # Alois P. Heinz, Sep 27 2018
  • Mathematica
    h[n_] := h[n] = 1 + Floor@Log[2, n];
    b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, 0, b[n, i-1-Mod[i, 2]] + If[EvenQ[i] || i>n, 0, Function[p, p + {0, p[[1]] h[i]}][b[n - i, i]]]]];
    a[n_] := b[n, n][[2]];
    Array[a, 60] (* Jean-François Alcover, Dec 12 2020, after Alois P. Heinz *)