cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A191315 #19 Jul 17 2017 02:18:19
%S A191315 0,0,1,2,6,11,27,50,115,216,481,913,1992,3809,8192,15748,33512,64685,
%T A191315 136546,264422,554686,1077055,2248105,4375221,9095238,17735812,
%U A191315 36745504,71776633,148288346,290092160,597876033,1171153370,2408702852,4723840544,9697826974,19038878297
%N 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).
%C A191315 a(n) = Sum_{k>=0} k * A191314(n,k).
%H A191315 Alois P. Heinz, <a href="/A191315/b191315.txt">Table of n, a(n) for n = 0..1000</a>
%F A191315 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 A191315 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 A191315 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 A191315 # second Maple program:
%p A191315 b:= proc(x, y, m) option remember;
%p A191315       `if`(y>x or y<0, 0, `if`(x=0, m, b(x-1, y-1, m)+
%p A191315       `if`(y=0, b(x-1, y, m), 0)+b(x-1, y+1, max(m, y+1))))
%p A191315     end:
%p A191315 a:= n-> b(n, 0$2):
%p A191315 seq(a(n), n=0..30);  # _Alois P. Heinz_, Mar 13 2017
%t A191315 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 A191315 Cf. A108299, A191314.
%K A191315 nonn
%O A191315 0,4
%A A191315 _Emeric Deutsch_, May 31 2011