%I #21 Jul 22 2022 11:46:57
%S 0,0,1,2,7,14,35,70,156,312,663,1326,2756,5512,11325,22650,46227,
%T 92454,187891,375782,761465,1522930,3079475,6158950,12434015,24868030,
%U 50142687,100285374,202010787,404021574,813191039,1626382078,3271314744,6542629488
%N Sum of the heights of the base pyramids in all dispersed Dyck paths of length n (i.e., in all Motzkin paths of length n with no (1,0)-steps at positive heights). A base pyramid is a factor of the form U^j D^j (j>0), starting at the horizontal axis. Here U=(1,1) and D=(1,-1).
%H G. C. Greubel, <a href="/A191396/b191396.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) = Sum_{k>=0} k*A191395(n,k).
%F G.f.: g(z) = 4*z^2/(1-2*z-z^2+2*z^3+(1-z^2)*sqrt(1-4*z^2))^2.
%F a(n) ~ 2^(n+3)/9 * (1-sqrt(2)/sqrt(Pi*n)). - _Vaclav Kotesovec_, Mar 21 2014
%F D-finite with recurrence n*a(n) -2*n*a(n-1) +6*(-n+2)*a(n-2) +12*(n-2)*a(n-3) +3*(3*n-8)*a(n-4) +6*(-3*n+8)*a(n-5) +4*(-n+3)*a(n-6) +8*(n-3)*a(n-7)=0. - _R. J. Mathar_, Oct 08 2016
%e a(4)=7 because in HHHH, HHUD, HUDH, UDHH, UDUD, and UUDD the sum of the heights of the base pyramids are 0, 1, 1, 1, 2, and 2, respectively.
%p g := 4*z^2/(1-2*z-z^2+2*z^3+(1-z^2)*sqrt(1-4*z^2))^2: gser := series(g, z = 0, 37): seq(coeff(gser, z, n), n = 0 .. 33);
%t CoefficientList[Series[4*x^2/(1-2*x-x^2+2*x^3+(1-x^2)*Sqrt[1-4*x^2])^2, {x, 0, 20}], x] (* _Vaclav Kotesovec_, Mar 21 2014 *)
%o (PARI) x='x+O('x^50); concat([0,0], Vec(4*x^2/(1-2*x-x^2+2*x^3+(1-x^2)*sqrt(1-4*x^2))^2)) \\ _G. C. Greubel_, May 27 2017
%K nonn
%O 0,4
%A _Emeric Deutsch_, Jun 04 2011