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.

A066624 Number of 1's in binary expansion of parts in all partitions of n.

Original entry on oeis.org

0, 1, 3, 7, 13, 23, 41, 65, 102, 156, 234, 340, 495, 697, 982, 1359, 1864, 2523, 3408, 4536, 6022, 7918, 10365, 13457, 17423, 22380, 28666, 36498, 46318, 58466, 73617, 92221, 115236, 143402, 177984, 220086, 271524, 333810, 409490, 500804, 611149, 743728, 903296
Offset: 0

Views

Author

Naohiro Nomoto, Jan 09 2002

Keywords

Examples

			For n = 3: 11 = 10+1 = 1+1+1 [binary expansion of partitions of 3]. a(3) = (two 1's) + (two 1's) + (three 1's), so a(3) = 7.
		

Crossrefs

Programs

  • Mathematica
    << DiscreteMath`Combinatorica`; Table[Count[Flatten[IntegerDigits[Partitions[n], 2]], 1], {n, 0, 50}]
    Table[Total[Flatten[IntegerDigits[#,2]&/@IntegerPartitions[n]]],{n,0,50}] (* Harvey P. Dale, Mar 29 2022 *)

Extensions

More terms from Vladeta Jovovic and Robert G. Wilson v, Jan 11 2002

A319140 Total number of binary digits in all partitions of n into distinct parts.

Original entry on oeis.org

1, 2, 5, 6, 11, 17, 23, 30, 44, 60, 76, 102, 128, 166, 214, 264, 327, 413, 502, 618, 759, 917, 1105, 1335, 1598, 1907, 2279, 2702, 3191, 3776, 4436, 5198, 6101, 7113, 8292, 9653, 11188, 12951, 14984, 17277, 19889, 22881, 26248, 30073, 34439, 39320, 44850
Offset: 1

Views

Author

David S. Newman, Sep 11 2018

Keywords

Examples

			For n = 4 there are 2 partitions into distinct parts in binary they are: 100, 11+1, for a total of 6 binary parts.
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; 1+ilog2(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+h(i)
           *[0, p[1]])(b(n-i, min(n-i, i-1)))))
        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[n > i*(i+1)/2, 0, b[n, i-1] + Function[p, p + h[i]*{0, p[[1]]}][b[n-i, Min[n-i, i-1]]]]];
    a[n_] := b[n, n][[2]];
    a /@ Range[1; 60] (* Jean-François Alcover, Sep 28 2019, after Alois P. Heinz *)
  • PARI
    seq(n)={[subst(deriv(p,y), y, 1) | p<-Vec(-1 + prod(k=1, n, 1 + x^k*y^(logint(k,2)+1) + O(x*x^n)))]} \\ Andrew Howroyd, Sep 17 2018
Showing 1-2 of 2 results.