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