OFFSET
0,4
LINKS
Robert Israel, Table of n, a(n) for n = 0..688
M. Bousquet-Mélou and M. Mishna, Walks with small steps in the quarter plane, arXiv:0810.4387 [math.CO], 2008.
FORMULA
G.f.: Int((6*x^3+2*x^2+x-1)*Int(x*(16*x^3+6*x^2-6*x+1+2*x^2*(1-17*x^2+6*x^3+22*x^4)*hypergeom([3/4, 5/4],[2],64*x^4)-(44*x^4-16*x^2+6*x-1)*hypergeom([1/4, 3/4],[1],64*x^4))/((6*x^3+2*x^2+x-1)^2*(1-2*x-3*x^2)^(1/2)),x)/((1-2*x-3*x^2)^(1/2)*x^2),x)/(x*(x-1)). - Mark van Hoeij, Aug 25 2014
MAPLE
f:= proc(a, b, n) option remember;
local t;
if n = 0 then if a = 0 then return 1 else return 0 fi fi;
if a > n then return 0 fi;
t:= procname(a+1, b+1, n-1);
if a >= 1 then t:= t + procname(a-1, b+1, n-1) fi;
if b >= 1 then t:= t + procname(a, b-1, n-1) fi;
t;
end proc:
seq(f(0, 0, n), n=0..50); # Robert Israel, Apr 09 2018
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[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