OFFSET
0,3
LINKS
Robert Israel, Table of n, a(n) for n = 0..100
A. Bostan and M. Kauers, Automatic Classification of Restricted Lattice Walks, arXiv:0811.2899 [math.CO], 2008.
MAPLE
N:= 50: # to get a(0)..a(N)
S:= [[-1, -1, 1], [-1, 0, 0], [0, -1, 0], [0, 1, -1], [1, 1, 1]]:
B:=Array(0..N, 0..N, 0..N):
B[0, 0, 0]:= 1: A[0]:= 1:
for n from 1 to N do
A[n]:= 0;
Bp:= Array(0..N, 0..N, 0..N);
for i from 0 to n-1 do
for j from 0 to n-1 do
for k from 0 to n-1 do
for s in S do
p:= [i, j, k] + s;
if min(p) >= 0 then
Bp[op(p)]:= Bp[op(p)]+B[i, j, k];
A[n]:= A[n]+B[i, j, k];
fi
od od od od;
B:= copy(Bp);
od:
seq(A[i], i=0..N); # Robert Israel, Sep 15 2016
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, -1 + k, -1 + n] + aux[i, -1 + j, 1 + k, -1 + n] + aux[i, 1 + j, k, -1 + n] + aux[1 + i, j, k, -1 + n] + aux[1 + i, 1 + j, -1 + 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