OFFSET
1,2
COMMENTS
Number of planar walks starting at (1,1), ending at (n,n), remaining in the first quadrant and using steps (-1,2) and (2,-1).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
M. Bousquet-Mélou and M. Petkovsek, Walks confined in a quadrant are not always D-finite
FORMULA
a(n) ~ c * 4^n / sqrt(n), where c = 0.03748220353529780423030694970938451772844604409392271... . - Vaclav Kotesovec, Oct 07 2016
MAPLE
b:= proc(l) option remember; `if`(l=[1$2], 1, add((p->
`if`(p[1]<0, 0, b(p)))(sort(l-x)), x=[[-1, 2], [2, -1]]))
end:
a:= n-> b([n$2]):
seq(a(n), n=1..30); # Alois P. Heinz, Oct 06 2016
MATHEMATICA
b[l_List] := b[l] = If[l == {1, 1}, 1, Sum[Function[p, If[p[[1]] < 0, 0, b[p]]][Sort[l - x]], {x, {{-1, 2}, {2, -1}}}]]; a[n_] := b[{n, n}]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Dec 02 2016 after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
EXTENSIONS
a(1)=1 prepended by Alois P. Heinz, Oct 06 2016
STATUS
approved