OFFSET
0,6
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2090
Wikipedia, Counting lattice paths
FORMULA
a(n) mod 2 = A121262(n) for n >= 1.
EXAMPLE
a(4) = 1: UDUDUDUD.
a(5) = 4: UDUDUDUUDD, UDUDUUDUDD, UDUUDUDUDD, UUDUDUDUDD.
MAPLE
a:= n-> `if`(n<4, 0, binomial(n-1, 3)*add(binomial(n-3, j)*
binomial(n-3-j, j-1), j=0..ceil((n-3)/2))/(n-3)):
seq(a(n), n=0..29);
# second Maple program:
a:= proc(n) option remember; `if`(n<5, [0$4, 1][n+1],
(n-1)*((2*n-7)*a(n-1)+3*(n-2)*a(n-2))/((n-2)*(n-4)))
end:
seq(a(n), n=0..29);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 22 2024
STATUS
approved