login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A278398
Number of meanders (walks starting at the origin and ending at any altitude >= 0 that may touch but never go below the x-axis) with n steps from {-3,-2,-1,1,2,3}.
9
1, 3, 15, 75, 400, 2169, 11989, 66985, 377718, 2144290, 12240943, 70193305, 404029950, 2332989921, 13508237399, 78399357623, 455959701700, 2656652705422, 15504203678738, 90614205677898, 530288460288008, 3107012752773125, 18223934202102463, 106996319699099591
OFFSET
0,2
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, -3, 3}] - 1; p = 1; v[[1]] = 1; For[i = 2, i <= n, i++, p = p*m // Expand; p = p - frac[p]; v[[i]] = p /. x -> 1]; v];
seq[24] (* Jean-François Alcover, Jul 01 2018, after Andrew Howroyd *)
PROG
(PARI) seq(n)={my(v=vector(n), m=sum(i=-3, 3, x^i)-1, p=1); v[1]=1; for(i=2, n, p*=m; p-=frac(p); v[i]=subst(p, x, 1)); v} \\ Andrew Howroyd, Jun 27 2018
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
David Nguyen, Nov 20 2016
STATUS
approved