login
A151144
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, -1), (0, 1, 1), (1, 0, 1), (1, 1, 0)}
1
1, 3, 11, 47, 203, 918, 4198, 19533, 91613, 433404, 2061712, 9857055, 47311565, 227842490, 1100343164, 5326816751, 25841660112, 125593622710, 611391307455, 2980540346318, 14548917393539, 71099993319936, 347827875282227, 1703231247407007, 8347599106443669, 40944622211660717, 200979597059271569
OFFSET
0,2
LINKS
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
Sequence in context: A163063 A151142 A151143 * A151145 A151146 A151147
KEYWORD
nonn,walk
AUTHOR
Manuel Kauers, Nov 18 2008
STATUS
approved