[go: up one dir, main page]

login
A278391
Number of positive meanders (walks starting at the origin and ending at any altitude > 0 that never touch or go below the x-axis in between) with n steps from {-2,-1,0,1,2}.
7
1, 2, 7, 29, 126, 565, 2583, 11971, 56038, 264345, 1254579, 5983628, 28655047, 137697549, 663621741, 3206344672, 15525816066, 75324830665, 366071485943, 1781794374016, 8684511754535, 42381025041490, 207055067487165, 1012617403658500, 4956924278927910
OFFSET
0,2
COMMENTS
By convention, the empty walk (corresponding to n=0) is considered to be a positive meander.
LINKS
C. Banderier, C. Krattenthaler, A. Krinik, D. Kruchinin, V. Kruchinin, D. Nguyen, and M. Wallner, Explicit formulas for enumeration of lattice paths: basketball and the kernel method, arXiv:1609.06473 [math.CO], 2016.
MATHEMATICA
frac[ex_] := Select[ex, Exponent[#, x] < 0&];
seq[n_] := Module[{v, m, p}, v = Table[0, n]; m = Sum[x^i, {i, -2, 2}]; p = 1/x; v[[1]] = 1; For[i = 2, i <= n, i++, p = p*m // Expand; p = p - frac[p]; v[[i]] = p /. x -> 1]; v];
seq[25] (* Jean-François Alcover, Jun 30 2018, after Andrew Howroyd *)
PROG
(PARI) seq(n)={my(v=vector(n), m=sum(i=-2, 2, x^i), p=1/x); v[1]=1; for(i=2, n, p*=m; p-=frac(p); v[i]=subst(p, x, 1)); v} \\ Andrew Howroyd, Jun 27 2018
KEYWORD
nonn,walk
AUTHOR
David Nguyen, Nov 20 2016
STATUS
approved