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.

A276430 Triangle read by rows: T(n,k) is the number of partitions of n having k parts that are powers of 2 with positive exponent (n>=0).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 1, 3, 3, 1, 5, 3, 2, 1, 6, 5, 3, 1, 7, 8, 4, 2, 1, 10, 10, 6, 3, 1, 13, 13, 9, 4, 2, 1, 16, 18, 12, 6, 3, 1, 22, 22, 16, 10, 4, 2, 1, 27, 29, 22, 13, 6, 3, 1, 33, 40, 28, 17, 10, 4, 2, 1, 43, 49, 37, 24, 13, 6, 3, 1, 52, 63, 50, 31, 18, 10, 4, 2, 1
Offset: 0

Views

Author

Emeric Deutsch, Sep 19 2016

Keywords

Comments

Sum of entries in row n is A000041(n) (the partition numbers).
T(n,0) = A276431(n).
Sum(k*T(n,k), k>=0) = A073119(n).

Examples

			T(6,1) = 3, counting [1,1,4], [1,2,3], [1,1,1,1,2];
T(6,2) = 2, counting [2,4], [1,1,2,2];
T(6,3) = 1, counting [2,2,2];
Triangle starts:
1;
1;
1,1;
2,1;
2,2,1;
3,3,1;
...
		

Crossrefs

Programs

  • Maple
    h := proc (i) options operator, arrow: 2^i end proc: G := product((1-x^h(i))/((1-x^i)*(1-t*x^h(i))), i = 1 .. 30): Gser := simplify(series(G, x = 0, 25)): for n from 0 to 20 do P[n] := sort(coeff(Gser, x, n)) end do: for n from 0 to 20 do seq(coeff(P[n], t, k), k = 0 .. degree(P[n])) end do; # yields sequence in triangular form
    # second Maple program:
    p2:= proc(n) p2(n):= is(n=2^ilog2(n)) end:
    b:= proc(n, i) option remember; expand(`if`(n=0 or i=1, 1,
          b(n, i-1)+`if`(i>n, 0, b(n-i, i)*`if`(p2(i), x, 1))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..30);  # Alois P. Heinz, Sep 20 2016
  • Mathematica
    p2[n_] := n == 2^Floor[Log[2, n]]; b[n_, i_] := b[n, i] = Expand[If[n == 0 || i == 1, 1, b[n, i-1] + If[i>n, 0, b[n-i, i]*If[p2[i], x, 1]]]]; T[n_] := Function [p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n]]; Table[T[n], {n, 0, 30}] // Flatten (* Jean-François Alcover, Dec 21 2016, after Alois P. Heinz *)

Formula

G.f.: G(t,x) = Product_{i>=1} (1-x^{h(i)})/((1-x^i)*(1-t*x^{h(i)})), where h(i) = 2^i.

A342230 Total number of parts which are powers of 2 in all partitions of n.

Original entry on oeis.org

0, 1, 3, 5, 11, 17, 29, 44, 71, 102, 153, 216, 311, 429, 599, 810, 1108, 1475, 1974, 2595, 3421, 4441, 5776, 7422, 9542, 12147, 15459, 19513, 24617, 30838, 38590, 48012, 59662, 73754, 91056, 111916, 137357, 167922, 204982, 249349, 302873, 366732, 443390, 534573
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 06 2021

Keywords

Examples

			For n = 4 we have:
------------------------------------
Partitions        Number of parts
.              which are powers of 2
------------------------------------
4 ..................... 1
3 + 1 ................. 1
2 + 2 ................. 2
2 + 1 + 1 ............. 3
1 + 1 + 1 + 1 ......... 4
------------------------------------
Total ................ 11
So a(4) = 11.
		

Crossrefs

Programs

  • Mathematica
    nmax = 43; CoefficientList[Series[Sum[x^(2^k)/(1 - x^(2^k)), {k, 0, Floor[Log[2, nmax]] + 1}]/Product[(1 - x^j), {j, 1, nmax}], {x, 0, nmax}], x]
    Table[Sum[IntegerExponent[2 k, 2] PartitionsP[n - k], {k, 1, n}], {n, 0, 43}]

Formula

G.f.: Sum_{k>=0} x^(2^k)/(1 - x^(2^k)) / Product_{j>=1} (1 - x^j).
a(n) = Sum_{k=1..n} A001511(k) * A000041(n-k).
a(n) = A000070(n-1) + A073119(n).
Showing 1-2 of 2 results.