OFFSET
0,3
LINKS
Robert Israel, Table of n, a(n) for n = 0..700
A. Bostan, K. Raschel, and B. Salvy, Non-D-finite excursions in the quarter plane, J. Comb. Theory A 121 (2014) 45-63, Table 1 Tag 43, Tag 49.
Mireille Bousquet-Mélou and Marni Mishna, Walks with small steps in the quarter plane, arXiv:0810.4387 [math.CO], 2008-2009.
MAPLE
Steps:= [[-1, -1], [-1, 0], [-1, 1], [0, -1], [0, 1], [1, 1]]:
f:= proc(n, p) option remember; local t, s;
if max(p) > n then return 0 fi;
add(procname(n-1, s), s = select(t -> min(t)>=0, map(`+`, Steps, p)))
end proc:
f(0, [0, 0]):= 1:
map(f, [$0..40], [0, 0]); # Robert Israel, Aug 02 2024
MATHEMATICA
aux[i_Integer, j_Integer, n_Integer] := Which[Min[i, j, n] < 0 || Max[i, j] > n, 0, n == 0, KroneckerDelta[i, j, n], True, aux[i, j, n] = aux[-1 + i, -1 + j, -1 + n] + aux[i, -1 + j, -1 + n] + aux[i, 1 + j, -1 + n] + aux[1 + i, -1 + j, -1 + n] + aux[1 + i, j, -1 + n] + aux[1 + i, 1 + j, -1 + n]]; Table[aux[0, 0, n], {n, 0, 25}]
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Manuel Kauers, Nov 18 2008
STATUS
approved