OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..500
FORMULA
a(n) = A199915(2n,n).
a(n) ~ c * d^n / n^2, where d = (2 + 4/3^(3/4))^2 = 14.0982628380912972017512943055944... and c = 0.25546328221900708410379626465... - Vaclav Kotesovec, Mar 13 2019, updated Mar 17 2024
EXAMPLE
a(2) = 5: [(0,1),(0,-1),(0,1),(0,1)], [(0,1),(0,1),(0,-1),(0,1)], [(0,1),(0,1),(0,1),(0,-1)], [(1,0),(-1,1),(1,0),(-1,1)], [(1,0),(1,0),(-1,1),(-1,1)].
MAPLE
b:= proc(n, x, y) option remember; `if`(min(args, n-x-y)<0, 0, `if`(n=0, 1,
add(b(n-1, x-d[1], y-d[2]), d=[[1, 0], [0, 1], [0, -1], [-1, 1]])))
end:
a:= n-> b(2*n, 0, n):
seq(a(n), n=0..25);
MATHEMATICA
b[n_, x_, y_] := b[n, x, y] = If[Min[n, x, y, n - x - y] < 0, 0, If[n == 0, 1, Sum[b[n - 1, x - d[[1]], y - d[[2]]], {d, {{1, 0}, {0, 1}, {0, -1}, {-1, 1}}}]]];
a[n_] := b[2n, 0, n];
a /@ Range[0, 25] (* Jean-François Alcover, May 13 2020, after Maple *)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Sep 24 2018
STATUS
approved