%I #17 Dec 27 2023 21:33:34
%S 1,0,2,3,12,40,145,560,2240,9156,38724,166320,728508,3239808,14595438,
%T 66543477,306511920,1424916064,6679435048,31544500416,149986398848,
%U 717562911000,3452381033556,16696661334496,81136327037620,396022179418240,1940898351416600,9548613568549380,47143311987432240
%N Number of walks within N^2 (the first quadrant of Z^2) starting and ending at (0,0) and consisting of n steps taken from {(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, 0)}.
%H Robert Israel, <a href="/A151368/b151368.txt">Table of n, a(n) for n = 0..1366</a>
%H M. Bousquet-Mélou and M. Mishna, <a href="http://arxiv.org/abs/0810.4387">Walks with small steps in the quarter plane</a>, arXiv:0810.4387 [math.CO], 2008-2009.
%F G.f.: Int(Int(2*hypergeom([3/4, 5/4],[2],64*x^3*(2*x+1)/(8*x^2-1)^2)/(1-8*x^2)^(3/2),x),x)/x^2. - _Mark van Hoeij_, Aug 17 2014
%F 1024*(n+4)*(n+3)*(n+2)*(n+1)*a(n)+512*(5*n+23)*(n+4)*(n+3)*(n+2)*a(n+1)+32*(n+4)*(n+3)*(84*n^2+868*n+2243)*a(n+2)+32*(n+5)*(n+4)*(46*n^2+554*n+1671)*a(n+3)+4*(n+6)*(n+5)*(100*n^2+1372*n+4737)*a(n+4)+24*(n+6)*(n+7)*(n^2+17*n+75)*a(n+5)-2*(7*n+65)*(n+8)*(n+7)*(n+6)*a(n+6)-3*(n+10)*(n+9)*(n+8)*(n+7)*a(n+7)=0. - _Robert Israel_, Sep 03 2018
%p f:= gfun:-rectoproc({1024*(n+4)*(n+3)*(n+2)*(n+1)*a(n)+512*(5*n+23)*(n+4)*(n+3)*(n+2)*a(n+1)+32*(n+4)*(n+3)*(84*n^2+868*n+2243)*a(n+2)+32*(n+5)*(n+4)*(46*n^2+554*n+1671)*a(n+3)+4*(n+6)*(n+5)*(100*n^2+1372*n+4737)*a(n+4)+24*(n+6)*(n+7)*(n^2+17*n+75)*a(n+5)-2*(7*n+65)*(n+8)*(n+7)*(n+6)*a(n+6)-3*(n+10)*(n+9)*(n+8)*(n+7)*a(n+7),
%p a(0)=1, a(1)=0, a(2)=2, a(3)=3, a(4)=12, a(5)=40, a(6)=145},a(n),remember):
%p map(f, [$0..100]); # _Robert Israel_, Sep 03 2018
%t 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[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}]
%K nonn,walk
%O 0,3
%A _Manuel Kauers_, Nov 18 2008