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.

Showing 1-2 of 2 results.

A318756 Total number of binary digits used to write all partitions of n in binary notation.

Original entry on oeis.org

1, 4, 8, 18, 30, 55, 85, 141, 211, 324, 467, 691, 968, 1377, 1898, 2631, 3554, 4830, 6425, 8578, 11272, 14819, 19243, 25005, 32133, 41279, 52585, 66907, 84512, 106636, 133685, 167377, 208439, 259145, 320696, 396251, 487532, 598881, 732990, 895627, 1090752
Offset: 1

Views

Author

David S. Newman, Sep 02 2018

Keywords

Examples

			For n = 3 there are 3 partitions which when written in binary are: 11, 10+1, 1+1+1, for a total of 8 binary integers.
		

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)+(p-> p+[0, p[1]*
            h(i)])(b(n-i, min(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 + Log[2, n] // Floor;
    b[n_, i_] := b[n, i] = If[n == 0, {1, 0}, If[i < 1, 0, b[n, i - 1] + Function[p, p + {0, p[[1]]*h[i]}][b[n - i, Min[n - i, i]]]]];
    a[n_] := b[n, n][[2]];
    a /@ Range[1, 60] (* Jean-François Alcover, Sep 16 2019, after Alois P. Heinz *)
    Table[Length[Flatten[IntegerDigits[#,2]&/@IntegerPartitions[n]]],{n,50}] (* Harvey P. Dale, Aug 14 2021 *)
  • PARI
    a(n)={subst(deriv(polcoef(1/prod(k=1, n, 1 - x^k*y^(logint(k,2) + 1) + O(x*x^n)), n)), y, 1)} \\ Andrew Howroyd, Sep 07 2018

A347060 Total number of 1's in the binary expansion of parts in all partitions of n into distinct parts.

Original entry on oeis.org

0, 1, 1, 4, 4, 7, 11, 15, 20, 28, 39, 48, 64, 80, 104, 134, 167, 203, 257, 311, 381, 470, 566, 680, 820, 981, 1168, 1394, 1650, 1946, 2300, 2700, 3161, 3705, 4315, 5026, 5845, 6769, 7827, 9049, 10424, 11992, 13784, 15801, 18088, 20702, 23620, 26922, 30665
Offset: 0

Views

Author

Alois P. Heinz, Aug 14 2021

Keywords

Examples

			a(5) = 7 counts the 1's in [101], [100, 1], [11, 10].
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; add(i, i=Bits[Split](n)) end:
    b:= proc(n, i) option remember; `if`(n=0, [1, 0],
          `if`(n>i*(i+1)/2, 0, b(n, i-1)+(p-> p+
           [0, p[1]*h(i)])(b(n-i, min(n-i, i-1)))))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..60);
Showing 1-2 of 2 results.