login
Triangle read by rows: T(n,k) is the number of weighted lattice paths in B(n) having k ascents. The members of B(n) are paths of weight n that start at (0,0), end on but never go below the horizontal axis, and whose steps are of the following four kinds: an (1,0)-step with weight 1, an (1,0)-step with weight 2, a (1,1)-step with weight 2, and a (1,-1)-step with weight 1. The weight of a path is the sum of the weights of its steps. An ascent is a maximal sequence of consecutive (1,1)-steps.
1

%I #11 Feb 19 2016 05:14:25

%S 1,1,2,3,1,5,3,8,9,13,23,1,21,55,6,34,125,26,55,274,93,1,89,584,295,

%T 10,144,1218,861,60,233,2496,2362,281,1,377,5042,6176,1125,15,610,

%U 10064,15542,4036,120,987,19887,37906,13341,710,1,1597,38963,90071,41371,3479,21,2584,75779,209357,121873,14938,217,4181,146451,477520,344160,58108,1583,1

%N Triangle read by rows: T(n,k) is the number of weighted lattice paths in B(n) having k ascents. The members of B(n) are paths of weight n that start at (0,0), end on but never go below the horizontal axis, and whose steps are of the following four kinds: an (1,0)-step with weight 1, an (1,0)-step with weight 2, a (1,1)-step with weight 2, and a (1,-1)-step with weight 1. The weight of a path is the sum of the weights of its steps. An ascent is a maximal sequence of consecutive (1,1)-steps.

%C Sum of entries in row n is A004148(n+1) (the 2ndary structure numbers).

%C T(n,0) = A000045(n+1) (the Fibonacci numbers).

%C Number of entries in row n is 1 + floor(n/3).

%H Alois P. Heinz, <a href="/A246186/b246186.txt">Rows n = 0..250, flattened</a>

%H M. Bona and A. Knopfmacher, <a href="http://dx.doi.org/10.1007/s00026-010-0060-7">On the probability that certain compositions have the same number of parts</a>, Ann. Comb., 14 (2010), 291-306.

%F The g.f. g = g(t,z) satisfies g = 1 + z*g + z^2*g + t*z^3*g*A, where A = 1 + z*g + z^2*g + z^3*g*A.

%F The above two equations follow from G(t,x,z) = 1 + z*G(t,1,z) + z^2*G(t,1,z) + t*x*z^3*G(t,1/t,z)*G(t,1,z); here G(t,x,z) is the trivariate g.f. of the paths B(n), where t marks ascents, x marks the fact that the path starts with an (1,1)-step, and z marks weight.

%e Row 3 is 3,1. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and U=(1,1), D=(1,-1), the paths in B(3) are hhh, hH, Hh, and UD, having ascents 0, 0, 0, and 1, respectively.

%e Triangle starts:

%e 1;

%e 1;

%e 2;

%e 3,1;

%e 5,3;

%e 8,9;

%e 13,23,1;

%e 21,55,6;

%p eq := z^3*(-z^2+z^2*t-z+z*t+1)*g^2+(t*z^3-1-z^3+z^2+z)*g+1: g := RootOf(eq, g): gser := simplify(series(g, z = 0, 25)): for n from 0 to 20 do P[n] := sort(coeff(gser, z, n)) end do: for n from 0 to 20 do seq(coeff(P[n], t, k), k = 0 .. floor((1/3)*n)) end do; # yields sequence in triangular form

%p # second Maple program:

%p b:= proc(n, y, t) option remember; `if`(y<0 or y>n, 0,

%p `if`(n=0, 1, expand(b(n-1, y, 0)+`if`(n>1, b(n-2, y, 0)+

%p b(n-2, y+1, 1)*`if`(t=0, x, 1), 0) +b(n-1, y-1, 0))))

%p end:

%p T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):

%p seq(T(n), n=0..20); # _Alois P. Heinz_, Aug 30 2014

%t b[n_, y_, t_] := b[n, y, t] = If[y<0 || y>n, 0, If[n==0, 1, Expand[b[n-1, y, 0] + If[n>1, b[n-2, y, 0] + b[n-2, y+1, 1]*If[t==0, x, 1], 0] + b[n-1, y-1, 0]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* _Jean-François Alcover_, Feb 19 2016, after _Alois P. Heinz_ *)

%Y Cf. A004148, A000045.

%K nonn,tabf

%O 0,3

%A _Emeric Deutsch_, Aug 30 2014