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

%I #9 May 15 2018 03:01:27

%S 1,1,5,15,53,213,835,3295,13767,57685,241077,1029629,4454725,19208365,

%T 83540529,367533441,1617265003,7134065021,31725845327,141483149299,

%U 631238921461,2829861186507,12734724782627,57333350858939,258747925751701,1171914417315889,5313618366103365,24119543507783239

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

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

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

%p F:= proc(x, y, z, n) option remember; local t, s, u;

%p t:= 0:

%p if n <= min(x,y,z) then return 5^n fi;

%p for s in [[-1, -1, 0], [-1, 0, 0], [0, 0, -1], [1, -1, -1], [1, 1, 1]] do

%p u:= [x, y, z]+s;

%p if min(u) >= 0 then t:= t + procname(op(u), n-1) fi

%p od;

%p t

%p end proc:

%p seq(F(0, 0, 0, n), n=0..40); # _Robert Israel_, May 14 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, j, 1 + k, -1 + n] + aux[1 + i, j, 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}]

%K nonn,walk

%O 0,3

%A _Manuel Kauers_, Nov 18 2008