OFFSET
0,2
COMMENTS
These walks are not restricted to the first (nonnegative) octant.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..400
FORMULA
a(n) = A328347(2n,n).
MAPLE
b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(add(add(
`if`(i+j+k=1, (h-> `if`((w->w<0 or w<max(map(abs, h)))(add(t, t=h)),
0, b(h)))(sort(l-[i, j, k])), 0), k=r), j=r), i=r))([$-1..1]))
end:
a:= n-> b(sort([0, n$2])):
seq(a(n), n=0..23);
MATHEMATICA
b[l_] := b[l] = If[Last[l] == 0, 1, Function[r, Sum[If[i + j + k == 1, Function[h, If[Function[w, w < 0 || w < Max[Map[Abs, h]]][Total[h]], 0, b[h]]][Sort[l - {i, j, k}]], 0], {i, r}, {j, r}, {k, r}]][{-1, 0, 1}]];
a[n_] := b[Sort[{0, n, n}]];
a /@ Range[0, 23] (* Jean-François Alcover, May 13 2020, after Maple *)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Oct 15 2019
STATUS
approved