OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
M. Bousquet-Mélou and M. Mishna, 2008. Walks with small steps in the quarter plane, ArXiv 0810.4387.
MAPLE
b:= proc(n, l) option remember; `if` (l[1]<0 or l[2]<0 or n<l[1], 0, `if`
(n=0, 1, add (b(n-1, l+d), d=[[-1, -1], [-1, 1], [1, 0], [1, 1]])))
end:
a:= n-> b(2*n, [0$2]):
seq (a(n), n=0..30); # Alois P. Heinz, Jul 19 2012
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[-1 + i, j, -1 + n] + aux[1 + i, -1 + j, -1 + n] + aux[1 + i, 1 + j, -1 + n]]; Table[Sum[aux[0, k, 2 n], {k, 0, 2 n}], {n, 0, 25}]
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Manuel Kauers, Nov 18 2008
STATUS
approved