OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
Wikipedia, Lattice path
FORMULA
a(n) = A258222(n,n).
MAPLE
b:= proc(x, y, t, k) option remember; `if`(y>x or y<0, 0,
`if`(x=0, 1, b(x-1, y-1, false, k)*`if`(t, (k*x+y)/y, 1)
+ b(x-1, y+1, true, k) ))
end:
a:= n-> b(2*n, 0, false, n):
seq(a(n), n=0..18);
MATHEMATICA
b[x_, y_, t_, k_] := b[x, y, t, k] = If[y>x || y<0, 0, If[x == 0, 1, b[x - 1, y - 1, False, k] If[t, (k*x + y)/y, 1] + b[x - 1, y + 1, True, k]]];
a[n_] := b[2n, 0, False, n];
Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Jun 02 2018, from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 20 2017
STATUS
approved