A109078 Number of symmetric Dyck paths of semilength n and having no hills (i.e., no peaks at level 1).
1, 0, 1, 2, 4, 6, 13, 22, 46, 80, 166, 296, 610, 1106, 2269, 4166, 8518, 15792, 32206, 60172, 122464, 230252, 467842, 884236, 1794196, 3406104, 6903352, 13154948, 26635774, 50922986, 103020253, 197519942, 399300166, 767502944, 1550554582
Offset: 0
Keywords
Examples
a(4)=4 because we have uudduudd, uudududd, uuududdd and uuuudddd, where u=(1,1), d=(1,-1).
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
Programs
-
Magma
R
:=PowerSeriesRing(Rationals(), 40); Coefficients(R!( 2*(1-x-x*Sqrt(1-4*x^2)+2*x^2 +Sqrt(1-4*x^2))/(1+Sqrt(1-4*x^2)-2*x)/(1+Sqrt(1-4*x^2)+2*x^2) )); // G. C. Greubel, Apr 29 2019 -
Maple
g:=2*(1-z-z*sqrt(1-4*z^2)+2*z^2+sqrt(1-4*z^2))/(1+sqrt(1-4*z^2)-2*z)/(1+sqrt(1-4*z^2)+2*z^2): gser:=series(g,z=0,39): 1, seq(coeff(gser,z^n),n=1..36);
-
Mathematica
CoefficientList[Series[2*(1-x-x*Sqrt[1-4*x^2]+2*x^2+Sqrt[1-4*x^2])/(1+ Sqrt[1-4*x^2]-2*x)/(1+Sqrt[1-4*x^2]+2*x^2), {x, 0, 40}], x] (* Vaclav Kotesovec, Mar 20 2014 *)
-
PARI
my(x='x+O('x^40)); Vec(2*(1-x-x*sqrt(1-4*x^2)+2*x^2 +sqrt(1-4*x^2))/(1+sqrt(1-4*x^2)-2*x)/(1+sqrt(1-4*x^2)+2*x^2)) \\ G. C. Greubel, Mar 16 2017
-
Sage
(2*(1-x-x*sqrt(1-4*x^2)+2*x^2 +sqrt(1-4*x^2))/(1+sqrt(1-4*x^2)-2*x)/(1+sqrt(1-4*x^2)+2*x^2)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 29 2019
Formula
G.f.: 2*(1 -z +2*z^2 +(1-z)*q)/((1-2*z+q)*(1+2*z^2+q)), where q = sqrt(1-4*z^2).
a(n) ~ 2^(n+3/2)/(3*sqrt(Pi*n)). - Vaclav Kotesovec, Mar 20 2014
D-finite with recurrence 4*(n+1)*a(n) +2*(-n-3)*a(n-1) +2*(-7*n+11)*a(n-2) +(7*n-27)*a(n-3) +2*(-4*n+5)*a(n-4) +4*(n-3)*a(n-5)=0. - R. J. Mathar, Jul 26 2022
Comments