A283667 Number of Motzkin prefixes of length 2n and height n.
1, 3, 13, 64, 334, 1802, 9933, 55575, 314362, 1793126, 10295625, 59430043, 344559826, 2005026610, 11703965955, 68503652100, 401892122682, 2362629703214, 13914547415998, 82081163986020, 484893156220356, 2868234297838092, 16986185485228431, 100703275233924096
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1279
Programs
-
Maple
a:= proc(n) option remember; `if`(n<2, 1+2*n, ((4*n-2)*(455*n^6- 1155*n^5-2776*n^4+1047*n^3+1493*n^2-72*n-72)*a(n-1)+36* (n-1)*(2*n-1)*(2*n-3)*(13*n^4-7*n^3-64*n^2-44*n-6)*a(n-2))/ ((9*n+6)*(3*n+1)*(n+1)*(13*n^4-59*n^3+35*n^2+11*n-6))) end: seq(a(n), n=0..30);
-
Mathematica
b[x_, y_, m_] := b[x, y, m] = If[x == 0, z^m, b[x - 1, y, m] + If[y > 0, b[x - 1, y - 1, m], 0] + b[x - 1, y + 1, Max[m, y + 1]]]; a[n_] := SeriesCoefficient[b[2n, 0, 0], {z, 0, n}]; a /@ Range[0, 30] (* Jean-François Alcover, May 11 2020, after Alois P. Heinz in A283595 *)
Formula
Recursion: see Maple program.
a(n) = A283595(2n,n).
a(n) ~ sqrt(769 + 2762/sqrt(13)) * (70 + 2*13^(3/2))^n / (3^(3*n+3)*sqrt(3*Pi*n)). - Vaclav Kotesovec, Mar 13 2017