login
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, 1), (0, 1, 0), (1, -1, 1), (1, 1, -1)}.
1

%I #10 Jan 01 2024 00:55:42

%S 1,1,2,5,17,56,204,779,3083,12542,51867,218851,937428,4066279,

%T 17819039,78771159,351148071,1576762625,7124754861,32369976554,

%U 147797541104,677966771333,3123008282073,14439960175164,66992611362021,311781381899059,1455300136591569,6811383379597123,31959257776835476

%N 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, 1), (0, 1, 0), (1, -1, 1), (1, 1, -1)}.

%H Robert Israel, <a href="/A148410/b148410.txt">Table of n, a(n) for n = 0..200</a>

%H A. Bostan and M. Kauers, <a href="https://arxiv.org/abs/0811.2899">Automatic Classification of Restricted Lattice Walks</a>, arXiv:0811.2899 [math.CO], 2008-2009.

%p Steps:= [[-1, -1, -1], [-1, 0, 1], [0, 1, 0], [1, -1, 1], [1, 1, -1]]:

%p f:= proc(n, p) option remember; local t;

%p if n <= min(p) then return 5^n fi;

%p add(procname(n-1, t), t=remove(has, map(`+`, Steps, p), -1));

%p end proc: map(f, [$0..40], [0, 0, 0]); # _Robert Israel_, Dec 26 2018

%t 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[-1 + i, 1 + j, -1 + k, -1 + n] + aux[i, -1 + j, k, -1 + n] + aux[1 + i, j, -1 + 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}]

%K nonn,walk

%O 0,3

%A _Manuel Kauers_, Nov 18 2008