OFFSET
1,4
LINKS
Alois P. Heinz, Rows n = 1..141, flattened
FORMULA
G.f.: G(t,x) = sum(tx^j*product(1+x^i, i=1..j-1)/(1-tx^j), j >=1).
EXAMPLE
T(11,2) = 3 because we have [4,3,2,2], [3,3,3,2] and [3,2,2,2,2].
Triangle starts:
1;
1,1;
2,0,1;
2,1,0,1;
3,1,0,0,1;
4,1,1,0,0,1;
MAPLE
g:= sum(t*x^j*product(1+x^i, i=1..j-1)/(1-t*x^j), j=1..50): gser:=simplify(series(g, x=0, 17)): for n from 1 to 14 do P[n]:=sort(coeff(gser, x^n)) od: for n from 1 to 14 do seq(coeff(P[n], t, j), j=1..n) od; # yields sequence in triangular form
# second Maple program:
b:= proc(n, k, i) option remember;
`if`(n<0, 0, `if`(n=0, 1, `if`(i<k, 0, b(n, k, i-1)+
`if`(i>n, 0, b(n-i, k, i)) )))
end:
T:= (n, k)-> add(b(n-(i+k)*(i+1-k)/2, k, i), i=k..n):
seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Jul 06 2012
MATHEMATICA
b[n_, k_, i_] := b[n, k, i] = If[n<0, 0, If[n == 0, 1, If[i<k, 0, b[n, k, i-1] + If[i>n, 0, b[n-i, k, i]]]]]; T[n_, k_] := Sum[b[n-(i+k)*(i+1-k)/2, k, i], {i, k, n}]; Table[Table[T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)
CROSSREFS
AUTHOR
Emeric Deutsch, Mar 19 2006
STATUS
approved