A166297 Number of UUDUDD's starting at level 0 in all Dyck paths of semilength n with no UUU's and no DDD's (U=(1,1), D=(1,-1)).
0, 0, 0, 1, 2, 5, 12, 28, 66, 156, 370, 882, 2112, 5079, 12264, 29725, 72298, 176414, 431754, 1059595, 2607090, 6429913, 15893330, 39365876, 97692372, 242875105, 604836072, 1508619585, 3768496102, 9426815859, 23612178180, 59217406914
Offset: 0
Keywords
Examples
a(3)=1 because in UDUDUD, UDUUDD, UUDDUD, and UUDUDD we have 0+0+0+1=1 UUDUDD's starting at level 0.
Crossrefs
Cf. A166295.
Cf. A004148. - Emeric Deutsch, Nov 10 2009
Programs
-
Maple
G := 4*z^3/(1-z-z^2+sqrt(1-2*z-z^2-2*z^3+z^4))^2: Gser := series(G, z = 0, 35): seq(coeff(Gser, z, n), n = 0 .. 32);
-
Mathematica
CoefficientList[Series[4*x^3/(1-x-x^2+Sqrt[1-2*x-x^2-2*x^3+x^4])^2, {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 20 2014 *)
-
Maxima
a(n):=2*sum((binomial(n-1-k,k)*binomial(n-1-k,k+2))/(n-1-k),k,0,(n-2)/2); /* Vladimir Kruchinin, Oct 13 2020 */
Formula
G.f.: G(z) = 4*z^3/(1-z-z^2+sqrt(1-2*z-z^2-2*z^3+z^4))^2.
a(n) ~ sqrt(5 + 3*sqrt(5)) * ((3+sqrt(5))/2)^n / (sqrt(2*Pi) * n^(3/2)). - Vaclav Kotesovec, Mar 20 2014
a(n) = 2*Sum_{k=0..(n-2)/2} C(n-k-1,k)*C(n-k-1,k+2)/(n-k-1). - Vladimir Kruchinin, Oct 13 2020
D-finite with recurrence +(n+3)*a(n) +(-3*n-4)*a(n-1) +(n-4)*a(n-3) +2*(2*n-7)*a(n-4) +(n-6)*a(n-5) +(-n+7)*a(n-6)=0. - R. J. Mathar, Jul 24 2022
Comments