A367778 a(n) is the sum of the squares of the areas under Motzkin paths of length n.
0, 1, 6, 40, 198, 910, 3848, 15492, 59920, 224917, 824074, 2960828, 10466610, 36498195, 125801144, 429284612, 1452174984, 4874940295, 16254780970, 53873727516, 177594715034, 582603630260, 1902860189328, 6190199896600, 20064013907288, 64815504118695, 208739559416878, 670345766842528
Offset: 1
Keywords
Examples
a(3) = 6 = 1*2^2 + 2*1^2 because there is 1 Motzkin path of length 3 with area 2 and 2 Motzkin paths of length 3 with area 1.
Links
- AJ Bu, Explicit Generating Functions for the Sum of the Areas Under Dyck and Motzkin Paths (and for Their Powers), arXiv:2310.17026 [math.CO], 2023.
Programs
-
Maple
G:=((x - 1 + sqrt(-(x + 1)*(3*x - 1)))*(3*sqrt(-(x + 1)*(3*x - 1))*x^4 - 9*x^5 - 14*sqrt(-(x + 1)*(3*x - 1))*x^3 + 15*x^4 + 8*sqrt(-(x + 1)*(3*x - 1))*x^2 + 26*x^3 + 4*sqrt(-(x + 1)*(3*x - 1))*x - 4*x^2 - sqrt(-(x + 1)*(3*x - 1)) - 5*x + 1))/( 4*(x + 1)^3*(3*x - 1)^3*x^2): Gser:=series(G, x=0, 30): seq(coeff(Gser,x,n), n=1..26);
-
PARI
seq(n) = {my(w=sqrt((1 + x)*(1 - 3*x) + O(x*x^n))); Vec((1 - x - w)*(w^2*(1 - 3*x - 7*x^2 + 3*x^3) - w*(1 - x)*(1 - 3*x - 11*x^2 + 3*x^3))/(2*w^3*x)^2, -n)} \\ Andrew Howroyd, Jan 07 2024
Formula
G.f.: (1 - x - w)*(w^2*(1 - 3*x - 7*x^2 + 3*x^3) - w*(1 - x)*(1 - 3*x - 11*x^2 + 3*x^3))/(2*w^3*x)^2 where w is sqrt((1 + x)*(1 - 3*x)).
D-finite with recurrence -(n+2)*(37012171*n -222599339)*a(n) +3*(n+1)*(108071243*n -631482704)*a(n-1) +(-512534971*n^2 +2421530181*n +1780794712)*a(n-2) +3*(-641100693*n^2 +4745437175*n -5322233482)*a(n-3) +(4162359143*n^2 -33175360881*n +59296953526)*a(n-4) +3*(1437180249*n^2 -9681487559*n +8357806732)*a(n-5) +9*(-754462425*n^2 +6932112703*n -14939114852)*a(n-6) -27*(218140823*n -693079002)*(n-5)*a(n-7)=0. - R. J. Mathar, Jan 11 2024
Comments