login
A148556
Number of walks within N^3 (the first octant of Z^3) starting at (0,0,0) and consisting of n steps taken from {(-1, -1, 0), (-1, 1, 0), (0, 0, -1), (0, 0, 1), (1, 0, -1)}.
1
1, 1, 3, 6, 18, 47, 146, 437, 1451, 4668, 16319, 55099, 198142, 694725, 2550044, 9196709, 34419107, 126786769, 482259784, 1807496942, 6961192206, 26474866175, 103031786721, 396643062709, 1558079024775, 6059890716650, 23997891168321, 94170491451715, 375529653219883, 1485175637380365, 5959097542175507
OFFSET
0,3
LINKS
A. Bostan and M. Kauers, 2008. Automatic Classification of Restricted Lattice Walks, ArXiv 0811.2899.
MAPLE
Steps:= [[-1, -1, 0], [-1, 1, 0], [0, 0, -1], [0, 0, 1], [1, 0, -1]]:
f:= proc(n, p) option remember;
if n <= min(p) then return 5^n fi;
add(procname(n-1, t), t=remove(has, map(`+`, Steps, p), -1)); end proc:
map(f, [$0..40], [0, 0, 0]); # Robert Israel, Sep 09 2025
MATHEMATICA
aux[i_Integer, j_Integer, k_Integer, n_Integer] := Which[Min[i, j, k, n] < 0 || Max[i, j, k] > n, 0, n == 0, KroneckerDelta[i, j, k, n], True, aux[i, j, k, n] = aux[-1 + i, j, 1 + k, -1 + n] + aux[i, j, -1 + k, -1 + n] + aux[i, j, 1 + k, -1 + n] + aux[1 + i, -1 + j, k, -1 + n] + aux[1 + i, 1 + j, k, -1 + n]]; Table[Sum[aux[i, j, k, n], {i, 0, n}, {j, 0, n}, {k, 0, n}], {n, 0, 10}]
CROSSREFS
Sequence in context: A289587 A151262 A148555 * A148557 A148558 A148559
KEYWORD
nonn,walk
AUTHOR
Manuel Kauers, Nov 18 2008
STATUS
approved