OFFSET
0,2
LINKS
Robert Israel, Table of n, a(n) for n = 0..100
A. Bostan and M. Kauers, 2008. Automatic Classification of Restricted Lattice Walks, ArXiv 0811.2899.
MAPLE
f:= proc(n, x0, y0, z0)
option remember;
local T, d, X1;
if n = 0 then return 1 fi;
T:= 0;
for d in [[-1, -1, 0], [-1, 1, -1], [0, 1, 1], [1, 0, 1], [1, 1, 0]] do
X1:= [x0, y0, z0]+d;
if X1[1]>=0 and X1[2]>=0 and X1[3]>=0 then
T:= T + procname(n-1, op(X1));
fi
od
end proc;
A151144:= n -> f(n, 0, 0, 0); # Robert Israel, Mar 30 2014
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, -1 + j, k, -1 + n] + aux[-1 + i, j, -1 + k, -1 + n] + aux[i, -1 + j, -1 + k, -1 + n] + aux[1 + i, -1 + j, 1 + 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
KEYWORD
nonn,walk
AUTHOR
Manuel Kauers, Nov 18 2008
STATUS
approved