OFFSET
0,3
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..100
Wikipedia, Counting lattice paths
EXAMPLE
. a(2) = 2: /\ /\
. /\/ \ / \/\ .
MAPLE
b:= proc(n, j, v) option remember; `if`(n=j,
`if`(v=1, 1, 0), `if`(v<2, 0, add(b(n-j, i, v-1)*
i*binomial(j-1, i-2), i=1..min(j+1, n-j))))
end:
a:= n-> `if`(n=0, 1, add(b(w, 1, n), w=2*n-1..n*(n+1)/2)):
seq(a(n), n=0..18);
MATHEMATICA
b[n_, j_, v_]:=b[n, j, v]=If[n==j, If[v==1, 1, 0], If[v<2, 0, Sum[b[n - j, i, v - 1]*i*Binomial[j - 1, i - 2], {i, Min[j + 1, n - j]}]]]; a[n_]:=If[n==0, 1, Sum[b[w, 1, n], {w, 2*n - 1, n*(n + 1)/2}]]; Table[a[n], {n, 0, 18}] (* Indranil Ghosh, Jul 06 2017, after Maple code *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 22 2017
STATUS
approved