login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246183 Triangle read by rows: T(n,k) is the number of weighted lattice paths B(n) having k HH's. B(n) is the set of lattice paths of weight n that start in (0,0), end on the horizontal axis and never go below this axis, whose steps are of the following four kinds: a (1,0)-step h of weight 1; a (1,0)-step H of weight 2; a (1,1)-step u of weight 2; a (1,-1)-step d of weight 1. The weight of a path is the sum of the weights of its steps. 1

%I #17 Feb 08 2017 05:53:37

%S 1,1,2,4,7,1,15,2,33,3,1,71,9,2,158,23,3,1,357,54,10,2,812,136,26,3,1,

%T 1869,338,63,11,2,4338,835,167,29,3,1,10134,2087,428,72,12,2,23829,

%U 5216,1092,199,32,3,1,56341,13046,2826,523,81,13,2

%N Triangle read by rows: T(n,k) is the number of weighted lattice paths B(n) having k HH's. B(n) is the set of lattice paths of weight n that start in (0,0), end on the horizontal axis and never go below this axis, whose steps are of the following four kinds: a (1,0)-step h of weight 1; a (1,0)-step H of weight 2; a (1,1)-step u of weight 2; a (1,-1)-step d of weight 1. The weight of a path is the sum of the weights of its steps.

%C Number of entries in row n is floor(n/2) (n>=2).

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

%C Sum(k*T(n,k), k>=0) = A110320(n-3) (n>=4).

%H Alois P. Heinz, <a href="/A246183/b246183.txt">Rows n = 0..200, 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 G.f. G=G(t,z) satisfies z^3*(1+z^2-t*z^2)*G^2 - (1-z-t*z^2+t*z^3-z^3)*G +1+z^2-t*z^2=0.

%e Row 3 is 4. Indeed, the four paths of weight 3 are: ud, hH, Hh, and hhh; none of them contain HH.

%e Triangle starts:

%e 1;

%e 1;

%e 2;

%e 4;

%e 7,1;

%e 15,2;

%e 33,3,1;

%p eq := z^3*(1+z^2-t*z^2)*G^2-(1-z-t*z^2+t*z^3-z^3)*G+1+z^2-t*z^2 = 0: g := RootOf(eq, G): gser := simplify(series(g, z = 0, 22)): for j from 0 to 20 do P[j] := sort(coeff(gser, z, j)) end do: 1; for j to 20 do seq(coeff(P[j], t, q), q = 0 .. (1/2)*j-1) 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, `if`(n=0, 1,

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

%p b(n-2, y+1, 0), 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 24 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, 1]*If[t==1, x, 1] + b[n-2, y+1, 0], 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 08 2017, after _Alois P. Heinz_ *)

%Y Cf. A004148, A110320.

%K nonn,tabf

%O 0,3

%A _Emeric Deutsch_, Aug 23 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)