OFFSET
0,3
COMMENTS
LINKS
Alois P. Heinz, Rows n = 0..250, flattened
FORMULA
G.f.: G(t,x) = 1/product((1-x^(3j-2))(1-x^(3j-1))(1-tx^(3j)), j=1..infinity).
EXAMPLE
T(9,2) = 3 because we have [6,3], [3,3,2,1] and [3,3,1,1,1].
Triangle starts:
1;
1;
2;
2, 1;
4, 1;
5, 2;
7, 3, 1;
9, 5, 1;
...
MAPLE
g:=1/product((1-x^(3*j-2))*(1-x^(3*j-1))*(1-t*x^(3*j)), j=1..20): gser:=simplify(series(g, x=0, 26)): P[0]:=1: for n from 1 to 21 do P[n]:=coeff(gser, x^n) od: for n from 1 to 21 do seq(coeff(P[n], t, j), j=0..floor(n/3)) 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`(irem(i, 3)=0, 0$j, [][]), b(n-i*j, i-1)], 0) od; %[] fi
end:
T:= n-> b(n, n):
seq(T(n), n=0..30); # Alois P. Heinz, Jan 08 2013
MATHEMATICA
b[n_, i_] := b[n, i] = Module[{j}, If[n == 0, {1}, If[i<1, {0}, pc = {}; For[j = 0, j <= n/i, j++, pc = Plus @@ PadRight[{pc, If[Mod[i, 3] == 0, Array[0&, j], {}] ~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 19 2006
STATUS
approved