Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #16 Aug 03 2024 07:12:52
%S 1,0,2,2,13,27,140,392,1882,6289,28906,107949,486438,1948638,8730438,
%T 36611160,164259758,710530289,3203433595,14163150429,64260242637,
%U 288694503092,1318679597635,5996837692998,27572301084897,126595556379751,585652882733959,2709967750078764,12607711205847168
%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, 1)}.
%H Robert Israel, <a href="/A151367/b151367.txt">Table of n, a(n) for n = 0..700</a>
%H A. Bostan, K. Raschel, and B. Salvy, <a href="http://dx.doi.org/10.1016/j.jcta.2013.09.005">Non-D-finite excursions in the quarter plane</a>, J. Comb. Theory A 121 (2014) 45-63, Table 1 Tag 43, Tag 49.
%H Mireille Bousquet-Mélou and Marni 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.
%p Steps:= [[-1, -1], [-1, 0], [-1, 1], [0, -1], [0, 1], [1, 1]]:
%p f:= proc(n, p) option remember; local t, s;
%p if max(p) > n then return 0 fi;
%p add(procname(n-1, s), s = select(t -> min(t)>=0, map(`+`, Steps, p)))
%p end proc:
%p f(0, [0, 0]):= 1:
%p map(f, [$0..40], [0, 0]); # _Robert Israel_, Aug 02 2024
%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, -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}]
%K nonn,walk
%O 0,3
%A _Manuel Kauers_, Nov 18 2008