OFFSET
0,3
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
Emeric Deutsch, Problem 10658: Another Type of Lattice Path, American Math. Monthly, 107, 2000, 368-370.
FORMULA
G.f.: 1/(1-2tz+2z-zA-zA^2), where A=1+zA^2+zA^3 or, equivalently, A=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3 (the g.f. of A027307).
EXAMPLE
Example T(2,2)=4 because we have udud, udUdd, Uddud and UddUdd.
Triangle begins:
1;
0,2;
6,0,4;
34,24,0,8;
...
MAPLE
A:=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3: G:=1/(1-z*A+2*z-2*z*t-z*A^2): Gserz:=simplify(series(G, z=0, 12)): P[0]:=1: for n from 1 to 10 do P[n]:=sort(coeff(Gserz, z^n)) od: for n from 0 to 9 do seq(coeff(t*P[n], t^k), k=1..n+1) od; # yields sequence in triangular form
# second Maple program:
b:= proc(x, y, t) option remember; expand(`if`(y<0 or y>x, 0,
`if`(x=0, 1, b(x-1, y-1, t)*`if`(t and y=1, z, 1)+
b(x-1, y+2, is(y=0))+b(x-2, y+1, is(y=0)))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..n))(b(3*n, 0, false)):
seq(T(n), n=0..10); # Alois P. Heinz, Oct 06 2015
MATHEMATICA
b[x_, y_, t_] := b[x, y, t] = Expand[If[y<0 || y>x, 0, If[x == 0, 1, b[x-1, y-1, t]*If[t && y == 1, z, 1] + b[x-1, y+2, y == 0] + b[x-2, y+1, y == 0]]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 0, n}]][b[ 3*n, 0, False]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 25 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Jun 03 2005
STATUS
approved