login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A247300 Number of h- and H-steps at level 0 in all lattice paths in B(n). 2
0, 1, 3, 7, 17, 40, 94, 222, 526, 1252, 2994, 7191, 17343, 41989, 102023, 248712, 608168, 1491349, 3666685, 9037003, 22323243, 55259206, 137058248, 340567477, 847711177, 2113455657, 5277115687, 13195311961, 33038994039, 82829585094, 207905352180 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

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.

a(n) = Sum(k*A247299(n,k), 0<=k<=n).

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..1000

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.:  4*z*(1 + z)/(1 - z - z^2 +sqrt((1 + z + z^2)*(1 - 3*z + z^2)))^2.

a(n) ~ sqrt(525 + 235*sqrt(5)) * ((3 + sqrt(5))/2)^n / (sqrt(2*Pi)*n^(3/2)). - Vaclav Kotesovec, Mar 06 2016

EXAMPLE

a(3)=7 because in B(3) = {ud, hH, Hh, hhh} all h- and H-steps are at level 0.

MAPLE

G := 4*z*(1+z)/(1-z-z^2+sqrt((1+z+z^2)*(1-3*z+z^2)))^2: Gser := series(G, z = 0, 33): seq(coeff(Gser, z, n), n = 0 .. 30);

# second Maple program:

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

      `if`(n=0, [1, 0], (p-> p+`if`(y=0, [0, p[1]], 0))

      (b(n-1, y) +b(n-2, y)) +b(n-2, y+1) +b(n-1, y-1)))

    end:

a:= n-> b(n, 0)[2]:

seq(a(n), n=0..50);  # Alois P. Heinz, Sep 17 2014

MATHEMATICA

b[n_, y_] := b[n, y] = If[y<0 || y>n || n<0, 0, If[n == 0, {1, 0}, Function[{p}, p + If[y == 0, {0, p[[1]]}, 0]][b[n-1, y] + b[n-2, y]] + b[n-2, y+1] + b[n-1, y-1]]] ; a[n_] := b[n, 0][[2]]; Table[a[n], {n, 0, 50}] (* Jean-Fran├žois Alcover, May 27 2015, after Alois P. Heinz *)

CROSSREFS

Cf. A247299.

Sequence in context: A298371 A106472 A036885 * A137682 A190360 A167213

Adjacent sequences:  A247297 A247298 A247299 * A247301 A247302 A247303

KEYWORD

nonn

AUTHOR

Emeric Deutsch, Sep 17 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 20 05:37 EDT 2019. Contains 325168 sequences. (Running on oeis4.)