login
A149681
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, 1), (-1, 0, 0), (0, -1, 0), (0, 1, -1), (1, 1, 1)}.
1
1, 1, 5, 17, 67, 261, 1101, 4661, 20049, 87001, 382589, 1695781, 7569313, 33959517, 153131465, 693502931, 3153074549, 14383223399, 65803927299, 301837483491, 1387839853983, 6395130435889, 29526896412549, 136570991583717, 632714113089353, 2935698007000649, 13640280804487557, 63459615245411849
OFFSET
0,3
LINKS
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
Sequence in context: A149678 A149679 A149680 * A149682 A149683 A149684
KEYWORD
nonn,walk
AUTHOR
Manuel Kauers, Nov 18 2008
STATUS
approved