OFFSET
1,5
LINKS
Robert Israel, Table of n, a(n) for n = 1..10011
FORMULA
T(n, k) is the number of paths from (0, 0) to (n-k, k) in the directed graph having vertices (i, j) and edges (i, j)-to-(i+1, j) and (i, j)-to-(i, j+1) for i, j >= 0 and edges (i, j)-to-(i+1, j+1) for i even and j >= i and for j even and i >= j.
MAPLE
T:= proc(n, k) option remember;
if k=0 or k=n then return 1 fi;
if min(k, n-k)::even then procname(n-1, k-1)+procname(n-1, k)
else procname(n-1, k-1)+procname(n-2, k-1)+procname(n-1, k)
fi
end proc:
seq(seq(T(n, k), k=0..n), n=0..15); # Robert Israel, Jul 16 2019
MATHEMATICA
T[n_, k_] := T[n, k] = With[{}, If[k == 0 || k == n, Return[1]]; If[EvenQ[ Min[k, n-k]], T[n-1, k-1] + T[n-1, k], T[n-1, k-1] + T[n-2, k-1] + T[n-1, k]]];
Table[T[n, k], {n, 0, 15}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 04 2020, after Maple *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
STATUS
approved