OFFSET
0,9
COMMENTS
LINKS
Alois P. Heinz, Rows n = 0..500, flattened
FORMULA
G.f.: product(1+tx^j+x^(2j)/(1-x^j), j=1..infinity).
More generally, g.f. for the number of partitions of n having exactly k parts that appear exactly m times is product((t-1)*x^(m*j)+1/(1-x^j), j=1..infinity). - Vladeta Jovovic, Feb 21 2006
EXAMPLE
T(7,2) = 4 because we have [6,1], [5,2], [4,3], [3,2,1,1].
Triangle starts:
1;
0, 1;
1, 1;
1, 1, 1;
2, 2, 1;
1, 4, 2;
4, 4, 2, 1;
2, 8, 4, 1;
6, 8, 6, 2;
5, 12, 10, 3;
9, 16, 12, 4, 1;
MAPLE
g:=product(1+t*x^j+x^(2*j)/(1-x^j), j=1..40): gser:=simplify(series(g, x=0, 23)): P[0]:=1: for n from 1 to 21 do P[n]:=sort(coeff(gser, x^n)) od: for n from 0 to 21 do seq(coeff(P[n], t, j), j=0..floor((sqrt(1+8*n)-1)/2)) od; # yields sequence in triangular form
# second Maple program:
b:= proc(n, i) option remember; local j; if n=0 then 1
elif i<1 then 0 else []; for j from 0 to n/i do zip((x, y)
->x+y, %, [`if`(j=1, 0, [][]), b(n-i*j, i-1)], 0) od; %[] fi
end:
T:= n-> b(n, n):
seq(T(n), n=0..30); # Alois P. Heinz, Nov 07 2012
MATHEMATICA
b[n_, i_] := b[n, i] = Module[{j, pc}, If[n == 0, pc = {1}, If[i<1, pc = {0}, pc = {}; For[j = 0, j <= n/i, j++, pc = Plus @@ PadRight[{pc, If[j == 1, {0}, {}] ~Join~ b[n-i*j, i-1]}]]; pc]]]; T[n_] := b[n, n]; Table[T[n], {n, 0, 30}] // Flatten (* Jean-François Alcover, Jan 31 2014, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Feb 18 2006
STATUS
approved