OFFSET
0,3
COMMENTS
LINKS
Alois P. Heinz, Rows n = 0..300, flattened
Marilena Barnabei, Flavio Bonetti, and Niccolò Castronuovo, Motzkin and Catalan Tunnel Polynomials, J. Int. Seq., Vol. 21 (2018), Article 18.8.8.
Zhuang, Yan. A generalized Goulden-Jackson cluster method and lattice path enumeration, Discrete Mathematics 341.2 (2018): 358-379. Also arXiv: 1508.02793v2.
FORMULA
G.f.=G=G(t, z) satisfies G=1+zG+z^2*G(tz-z+G).
EXAMPLE
T(5,1)=6 because we have HH(UHD), UD(UHD), (UHD)HH, (UHD)UD, H(UHD)H and U(UHD)D, where U=(1,1),H=(1,0),D=(1,-1) (the UHD's are shown between parentheses).
Triangle begins:
1;
1;
2;
3, 1;
7, 2;
15, 6;
36, 14, 1;
...
MAPLE
G:=(1-z-t*z^3+z^3-sqrt((1-3*z+z^3-t*z^3)*(1+z+z^3-t*z^3)))/2/z^2: Gser:=simplify(series(G, z=0, 20)): P[0]:=1: for n from 1 to 17 do P[n]:=sort(coeff(Gser, z^n)) od: for n from 0 to 17 do seq(coeff(t*P[n], t^j), j=1..1+floor(n/3)) 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, `if`(t=1, 2, 0))+b(x-1, y-1, 0)*
`if`(t=2, z, 1)+b(x-1, y+1, 1))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0$2)):
seq(T(n), n=0..15); # Alois P. Heinz, Feb 01 2019
MATHEMATICA
CoefficientList[#, t]& /@ CoefficientList[(1 - z - t z^3 + z^3 - Sqrt[(1 - 3z + z^3 - t z^3)(1 + z + z^3 - t z^3)])/2/z^2 + O[z]^17, z] // Flatten (* Jean-François Alcover, Aug 07 2018 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Dec 09 2005
STATUS
approved