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!)
A191315 Sum of the heights of all dispersed Dyck paths of length n (i.e., of Motzkin paths of length n with no (1,0) steps at positive heights). 2

%I #19 Jul 17 2017 02:18:19

%S 0,0,1,2,6,11,27,50,115,216,481,913,1992,3809,8192,15748,33512,64685,

%T 136546,264422,554686,1077055,2248105,4375221,9095238,17735812,

%U 36745504,71776633,148288346,290092160,597876033,1171153370,2408702852,4723840544,9697826974,19038878297

%N Sum of the heights of all dispersed Dyck paths of length n (i.e., of Motzkin paths of length n with no (1,0) steps at positive heights).

%C a(n) = Sum_{k>=0} k * A191314(n,k).

%H Alois P. Heinz, <a href="/A191315/b191315.txt">Table of n, a(n) for n = 0..1000</a>

%F G.f.: G(z) = Sum_{j>=0}(jz^(2j)/(F(j)F(j+1))), where F(k) are polynomials in z defined by F(0)=1, F(1)=1-z, F(k)=F(k-1)-z^2*F(k-2) for k>=2. The coefficients of these polynomials form the triangle A108299.

%e a(4)=6 because the sum of the heights of the paths HHHH, HHUD, HUDH, UDHH, UDUD, and UUDD is 0+1+1+1+1+2=6; here U=(1,1), H=(1,0), D=(1,-1).

%p F[0] := 1: F[1] := 1-z: for k from 2 to 36 do F[k] := sort(expand(F[k-1]-z^2*F[k-2])) end do: G := sum(j*z^(2*j)/(F[j]*F[j+1]), j = 0 .. 34): Gser := series(G, z = 0, 40): seq(coeff(Gser, z, n), n = 0 .. 35);

%p # second Maple program:

%p b:= proc(x, y, m) option remember;

%p `if`(y>x or y<0, 0, `if`(x=0, m, b(x-1, y-1, m)+

%p `if`(y=0, b(x-1, y, m), 0)+b(x-1, y+1, max(m, y+1))))

%p end:

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

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Mar 13 2017

%t b[x_, y_, m_] := b[x, y, m] = If[y > x || y < 0, 0, If[x == 0, m, b[x - 1, y - 1, m] + If[y == 0, b[x - 1, y, m], 0] + b[x - 1, y + 1, Max[m, y + 1]]]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 40}] (* _Jean-Fran├žois Alcover_, May 16 2017, after _Alois P. Heinz_ *)

%Y Cf. A108299, A191314.

%K nonn

%O 0,4

%A _Emeric Deutsch_, May 31 2011

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 November 29 03:03 EST 2023. Contains 367422 sequences. (Running on oeis4.)