OFFSET
1,4
COMMENTS
LINKS
Alois P. Heinz, Rows n = 1..141, flattened
FORMULA
G.f.: G(t,z) -1, where G=G(t,z) satisfies z^3*G^2 - (1+z-tz)(1-tz-z^2)G+(1+z-tz)^2=0.
EXAMPLE
T(5,2) = 6 because we have (UDUDUD)UUDD, UDU(UDUDUD)D, UUDD(UDUDUD), U(UDUD)D(UDUD), U(UDUDUD)DUD, and (UDUD)U(UDUD)D (the UDUD's are shown between parentheses).
Triangle starts:
1;
1, 1;
2, 1, 1;
2, 4, 1, 1;
4, 5, 6, 1, 1;
6, 12, 9, 8, 1, 1;
9, 23, 24, 14, 10, 1, 1;
...
MAPLE
F := RootOf(z^3*G^2-(1+z-t*z)*(1-t*z-z^2)*G+(1+z-t*z)^2, G): Fser := series(F, z = 0, 15): for n to 12 do P[n] := sort(coeff(Fser, z, n)) end do: for n to 12 do seq(coeff(P[n], t, j), j = 0 .. n-1) end do; # yields sequence in triangular form
# second Maple program:
b:= proc(x, y, t) option remember; `if`(y<0 or y>x or t=8, 0,
`if`(x=0, 1, expand(b(x-1, y+1, [2, 7, 4, 7, 2, 2, 8][t])
+`if`(t=4, z, 1) *b(x-1, y-1, [5, 3, 6, 3, 6, 8, 3][t]))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)):
seq(T(n), n=1..15); # Alois P. Heinz, Jun 04 2014
MATHEMATICA
b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x || t == 8, 0, If[x == 0, 1, Expand[b[x-1, y+1, {2, 7, 4, 7, 2, 2, 8}[[t]] ] + If[t == 4, z, 1]*b[x-1, y-1, {5, 3, 6, 3, 6, 8, 3}[[t]] ]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 1]]; Table[T[n], {n, 1, 15}] // Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Oct 12 2009
STATUS
approved