A151346 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, 0), (-1, 1), (0, -1), (1, 0)}.
1, 0, 1, 1, 2, 7, 10, 38, 89, 229, 752, 1873, 6009, 17746, 51970, 168199, 503489, 1609327, 5131184, 16183314, 53017947, 170708648, 559207257, 1846295302, 6075728984, 20284263554, 67649481468, 226890912838, 765669449228, 2585600921015, 8785174853897, 29918390234278, 102190450691351, 350429638975797
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- A. Bostan, K. Raschel, B. Salvy, Non-D-finite excursions in the quarter plane, J. Comb. Theory A 121 (2014) 45-63, Table 1 Tag 8, Tag 9.
- M. Bousquet-Mélou and M. Mishna, 2008. Walks with small steps in the quarter plane, ArXiv 0810.4387.
Programs
-
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[i, 1 + j, -1 + n] + aux[1 + i, -1 + j, -1 + n] + aux[1 + i, j, -1 + n]]; Table[aux[0, 0, n], {n, 0, 25}]