A319797 Number T(n,k) of partitions of n into exactly k positive triangular numbers; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1
Offset: 0
Examples
Triangle T(n,k) begins: 1; 0, 1; 0, 0, 1; 0, 1, 0, 1; 0, 0, 1, 0, 1; 0, 0, 0, 1, 0, 1; 0, 1, 1, 0, 1, 0, 1; 0, 0, 1, 1, 0, 1, 0, 1; 0, 0, 0, 1, 1, 0, 1, 0, 1; 0, 0, 1, 1, 1, 1, 0, 1, 0, 1; 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1; 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1; 0, 0, 1, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1;
Links
- Alois P. Heinz, Rows n = 0..200, flattened
Crossrefs
Programs
-
Maple
h:= proc(n) option remember; `if`(n<1, 0, `if`(issqr(8*n+1), n, h(n-1))) end: b:= proc(n, i) option remember; `if`(n=0 or i=1, x^n, b(n, h(i-1))+expand(x*b(n-i, h(min(n-i, i))))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, h(n))): seq(T(n), n=0..20);
-
Mathematica
h[n_] := h[n] = If[n < 1, 0, If[IntegerQ @ Sqrt[8*n + 1], n, h[n - 1]]]; b[n_, i_] := b[n, i] = If[n == 0 || i == 1, x^n, b[n, h[i - 1]] + Expand[ x*b[n - i, h[Min[n - i, i]]]]]; T[n_] := Table[Coefficient[#, x, i], {i, 0, n}]& @ b[n, h[n]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, May 27 2019, after Alois P. Heinz *)
Formula
T(n,k) = [x^n y^k] 1/Product_{j>=1} (1-y*x^A000217(j)).
Comments