OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..550
Wikipedia, Counting lattice paths
FORMULA
a(n) mod 2 = 1 - (n mod 2) = A059841(n).
a(n) ~ c * d^n * sqrt(n), where d = 3.7137893481485186502229788321701955452444... and c = 0.0685686817861124238901083560487601593693... - Vaclav Kotesovec, May 24 2019
MAPLE
b:= proc(x, y) option remember; `if`(y=0, [1$2],
(p-> p +[0, p[1]])(add(add(`if`(igcd(h, v)=1,
b(sort([x-h, y-v])[]), 0), v=1..y), h=1..x)))
end:
a:= n-> b(n$2)[2]:
seq(a(n), n=0..30);
MATHEMATICA
f[p_List] := p + {0, p[[1]]}; f[0] = 0;
b[{x_, y_}] := b[{x, y}] = If[y == 0, {1, 1},
f[Sum[Sum[If[GCD[h, v] == 1,
b[Sort[{x-h, y-v}]], {0, 0}], {v, 1, y}], {h, 1, x}]]];
a[n_] := b[{n, n}][[2]];
a /@ Range[0, 30] (* Jean-François Alcover, Apr 05 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 13 2019
STATUS
approved