OFFSET
0,10
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Wikipedia, Counting lattice paths
MAPLE
b:= proc(n, k, j) option remember;
`if`(n=j, 1, add(b(n-j, k, i)*(binomial(i, k)
*binomial(j-1, i-1-k)), i=1..min(j+k, n-j)))
end:
a:= n-> `if`(n=0, 1, b(n, 4$2)):
seq(a(n), n=0..35);
MATHEMATICA
b[n_, k_, j_] := b[n, k, j] = If[n == j, 1, Sum[b[n - j, k, i]*(Binomial[i, k]*Binomial[j - 1, i - 1 - k]), {i, 1, Min[j + k, n - j]}]];
a[n_] := If[n == 0, 1, b[n, 4, 4]];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 02 2018, from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 07 2017
STATUS
approved