%I #14 Apr 03 2017 16:16:34
%S 0,1,4,20,120,780,5382,38638,285762,2162033,16655167,130193037,
%T 1030117023,8234025705,66391916397,539360587341,4410492096741,
%U 36274113675369,299864297741292,2490192142719336,20764402240048267,173784940354460219,1459360304511145146
%N Number of positive walks with n steps {-4,-3,-2,-1,0,1,2,3,4} starting at the origin, ending at altitude 1, and staying strictly above the x-axis.
%H Alois P. Heinz, <a href="/A277920/b277920.txt">Table of n, a(n) for n = 0..1054</a>
%H C. Banderier, C. Krattenthaler, A. Krinik, D. Kruchinin, V. Kruchinin, D. Nguyen, and M. Wallner, <a href="https://arxiv.org/abs/1609.06473">Explicit formulas for enumeration of lattice paths: basketball and the kernel method</a>, arXiv:1609.06473 [math.CO], 2016.
%p b:= proc(n, y) option remember; `if`(n=0, `if`(y=1, 1, 0),
%p add((h-> `if`(h<1, 0, b(n-1, h)))(y+d), d=-4..4))
%p end:
%p a:= n-> b(n, 0):
%p seq(a(n), n=0..23); # _Alois P. Heinz_, Nov 12 2016
%t b[n_, y_] := b[n, y] = If[n == 0, If[y == 1, 1, 0], Sum[Function[h, If[h < 1, 0, b[n - 1, h]]][y + d], {d, -4, 4}]];
%t a[n_] := b[n, 0];
%t Table[a[n], {n, 0, 23}] (* _Jean-François Alcover_, Apr 03 2017, after _Alois P. Heinz_ *)
%Y Cf. A276902, A276852, A276901, A276903, A276904.
%K nonn,walk
%O 0,3
%A _David Nguyen_, Nov 04 2016
|