OFFSET
0,3
COMMENTS
REFERENCES
M. Bona and A. Knopfmacher, On the probability that certain compositions have the same number of parts, Ann. Comb., 14 (2010), 291-306.
FORMULA
G. f.: F=F(v,z) satisfies z^3*(z+z^2+v-vz-vz^2)F^2 - (1-z-z^2-z^3+vz^3)F+1=0 (z marks weight, v marks number of valleys).
The trivariate g.f. H(u,v,z), where u (v) marks peaks (valleys) and z marks weight is given by H=1+zH+z^2*H+z^3*(u-1+H)[v(H-1-zH-z^2*H)+1+zH+z^2*H].
EXAMPLE
T(7,1)=4. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and U=(1,1), D=(1,-1), we have hUDUD, UDUDh, UDUhD, and UhDUD.
Triangle starts:
1;
1;
2;
4;
8;
17;
36,1;
78,4;
171,14;
MAPLE
eq := z^3*(z+z^2+v-v*z-v*z^2)*F^2-(1-z-z^2-z^3+v*z^3)*F+1 = 0: F := RootOf(eq, F): Fser := simplify(series(F, z = 0, 20)): for n from 0 to 18 do P[n] := sort(coeff(Fser, z, n)) end do: 1; 1; 2; for n from 0 to 18 do seq(coeff(P[n], v, k), k = 0 .. floor((1/3)*n)-1) end do; # yields sequence in triangular form
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Dec 15 2010
STATUS
approved