OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..70
Wikipedia, Counting lattice paths
EXAMPLE
a(4) = 6:
/\ /\ /\ /\/\ /\/\
/\/\/\/\ /\/\/ \ /\/ \/\ / \/\/\ /\/ \ / \/\
MAPLE
b:= proc(n, s, j) option remember; `if`(n=j, 1, add(add(
b(n-j, s union {t}, i)*binomial(i, t)*binomial(j-1, i-1-t),
t={$max(1, i-j)..min(n-j, i-1)} minus s), i=1..n-j))
end:
a:= n-> `if`(n=0, 1, add(b(n, {k}, k), k=1..n)):
seq(a(n), n=0..30);
MATHEMATICA
b[n_, s_, j_] := b[n, s, j] = If[n==j, 1, Sum[Sum[b[n-j, s ~Union~ {t}, i]* Binomial[i, t]*Binomial[j-1, i-1-t], {t, Range[Max[1, i - j], Min[n - j, i - 1]] ~Complement~ s}], {i, 1, n - j}]];
a[n_] := If[n == 0, 1, Sum[b[n, {k}, k], {k, 1, n}]];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 31 2018, from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 04 2017
STATUS
approved