OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1054
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.
MAPLE
b:= proc(n, y) option remember; `if`(n=0, `if`(y=1, 1, 0),
add((h-> `if`(h<1, 0, b(n-1, h)))(y+d), d=-4..4))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..23); # Alois P. Heinz, Nov 12 2016
MATHEMATICA
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}]];
a[n_] := b[n, 0];
Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Apr 03 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
David Nguyen, Nov 04 2016
STATUS
approved