OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..250
Alois P. Heinz, Animation of A333647(9) = 169 paths with total area a(9) = 1762
Wikipedia, Counting lattice paths
MAPLE
b:= proc(x, y, t) option remember; `if`(x=0, [1, 0],
add((p-> p+[0, p[1]*(y+j/2)])(b(x-1, y+j, j)),
j=max(t-1, -y)..min(x*(x-1)/2-y, t+1)))
end:
a:= n-> b(n, 0$2)[2]:
seq(a(n), n=0..38);
MATHEMATICA
b[x_, y_, t_] := b[x, y, t] = If[x == 0, {1, 0},
Sum[Function[p, p + {0, If[p === 0, 0, p[[1]]]*(y + j/2)}][
b[x-1, y+j, j]], {j, Max[t-1, -y], Min[x(x-1)/2-y, t+1]}]];
a[n_] := b[n, 0, 0][[2]];
a /@ Range[0, 38] (* Jean-François Alcover, Apr 26 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 01 2020
STATUS
approved