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!)
A247291 Number of weighted lattice paths B(n) having no uhd strings. 4

%I #17 Sep 29 2021 11:19:59

%S 1,1,2,4,7,15,32,69,154,346,786,1806,4180,9745,22865,53938,127865,

%T 304447,727733,1745736,4201350,10140975,24544000,59551327,144822097,

%U 352940719,861839226,2108381480,5166749329,12681855551,31174671514,76742344774

%N Number of weighted lattice paths B(n) having no uhd strings.

%C 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: h = (1,0) of weight 1, H = (1,0) of weight 2, u = (1,1) of weight 2, and d = (1,-1) of weight 1. The weight of a path is the sum of the weights of its steps.

%C a(n) = A247290(n,0).

%H Alois P. Heinz, <a href="/A247291/b247291.txt">Table of n, a(n) for n = 0..1000</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(z) satisfies G = 1 + z*G + z^2*G + z^3*G*(G - z).

%F D-finite with recurrence +(n+3)*a(n) +(-2*n-3)*a(n-1) -n*a(n-2) +(-2*n+3)*a(n-3) +3*(n-3)*a(n-4) +(-2*n+9)*a(n-5) +2*(-n+6)*a(n-6) +(n-9)*a(n-8)=0. - _R. J. Mathar_, Sep 29 2021

%e a(4)=7 because we have hhhh, hhH, hHh, Hhh, HH, hud, and udh.

%p eq := G = 1+z*G+z^2*G+z^3*(G-z)*G: G := RootOf(eq, G): Gser := series(G, z = 0, 37): seq(coeff(Gser, z, n), n = 0 .. 35);

%p # second Maple program:

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

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

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

%p end:

%p a:= n-> b(n, 0$2):

%p seq(T(n), n=0..40); # _Alois P. Heinz_, Sep 16 2014

%t b[n_, y_, t_] := b[n, y, t] = If[y<0 || y>n || t == 3, 0, If[n == 0, 1, b[n-1, y, If[t == 1, 2, 0]] + If[n>1, b[n-2, y, 0] + b[n-2, y+1, 1], 0] + b[n-1, y-1, If[t == 2, 3, 0]]]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, May 27 2015, after _Alois P. Heinz_ *)

%Y Cf. A247290, A247293, A247295.

%K nonn

%O 0,3

%A _Emeric Deutsch_, Sep 16 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 25 10:01 EDT 2024. Contains 371967 sequences. (Running on oeis4.)