OFFSET
0,3
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1750
M. Bona and A. Knopfmacher, On the probability that certain compositions have the same number of parts, Ann. Comb., 14 (2010), 291-306.
E. Munarini, N. Zagaglia Salvi, On the Rank Polynomial of the Lattice of Order Ideals of Fences and Crowns, Discrete Mathematics 259 (2002), 163-177.
FORMULA
EXAMPLE
T(3,1)=1. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and u=(1,1), d=(1,-1), the five paths of weight 3 are ud, du, hH, Hh, and hhh; exactly one of them, namely ud, has one (1,-1)-return to the horizontal axis.
Triangle starts:
1;
1;
2;
4, 1;
8, 3;
17, 9;
37, 25, 1;
82, 66, 5;
...
MAPLE
eq := c = 1+z*c+z^2*c+z^3*c^2: c := RootOf(eq, c): G := 1/(1-z-z^2-t*z^3*c-z^3*c): Gser := simplify(series(G, z = 0, 19)): for n from 0 to 16 do P[n] := sort(coeff(Gser, z, n)) end do; for n from 0 to 16 do seq(coeff(P[n], t, k), k = 0 .. floor((1/3)*n)) end do: #yields sequence in triangular form
PROG
(PARI)
T(n)={[Vecrev(p) | p<-Vec(1/(1-x-x^2 - (1+y)*(1-x-x^2 - sqrt(1+x^4-2*x^3-x^2-2*x+O(x*x^n)))/2))]}
{ my(A=T(12)); for(n=1, #A, print(A[n])) } \\ Andrew Howroyd, Nov 05 2019
CROSSREFS
KEYWORD
nonn,walk,tabf
AUTHOR
Emeric Deutsch, Dec 12 2010
EXTENSIONS
Data corrected by Andrew Howroyd, Nov 05 2019
STATUS
approved