# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a278396 Showing 1-1 of 1 %I A278396 #28 Jul 01 2018 08:38:16 %S A278396 1,4,22,146,1013,7269,53156,394154,2951950,22279439,169175927, %T A278396 1290970376,9891573310,76050920691,586426828071,4533349152056, %U A278396 35122039919110,272634162463779,2119948044144136,16509519223752380,128747868290672353,1005273235488567875 %N A278396 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 {-4,-3,-2,-1,1,2,3,4}. %C A278396 By convention, the empty walk (corresponding to n=0) is considered to be a positive meander. %H A278396 Andrew Howroyd, Table of n, a(n) for n = 0..200 %H A278396 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. %t A278396 frac[ex_] := Select[ex, Exponent[#, x] < 0&]; %t A278396 seq[n_] := Module[{v, m, p}, v = Table[0, n]; m = Sum[x^i, {i, -4, 4}] - 1; 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]; %t A278396 seq[22] (* _Jean-François Alcover_, Jul 01 2018, after _Andrew Howroyd_ *) %o A278396 (PARI) seq(n)={my(v=vector(n), m=sum(i=-4, 4, x^i)-1, 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 %Y A278396 Cf. A276852, A278391, A278392, A278393, A278394, A278395, A278398. %K A278396 nonn,walk %O A278396 0,2 %A A278396 _David Nguyen_, Nov 20 2016 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE