OFFSET
0,5
COMMENTS
Equivalently, the number of paths from (0,0) to (n,k) using steps of the form (1,2),(1,1),(1,-1) or (1,-2) and staying on or above the x-axis.
It appears that A047002 gives the row sums of this triangle.
LINKS
Robert Israel, Table of n, a(n) for n = 0..10200
EXAMPLE
The table starts:
1
0,1,1
2,1,1,2,1
2,5,6,3,3,3,1
MAPLE
T:= proc(n, k) option remember;
if k < 0 or k > 2*n then return 0 fi;
procname(n-1, k-2)+procname(n-1, k-1)+procname(n-1, k+1)+procname(n-1, k+2)
end proc:
T(0, 0):= 1:
for nn from 0 to 10 do
seq(T(nn, k), k=0..2*nn)
od; # Robert Israel, Dec 19 2017
MATHEMATICA
T[n_, k_] := T[n, k] = If[k < 0 || k > 2n, 0, T[n-1, k-2] + T[n-1, k-1] + T[n-1, k+1] + T[n-1, k+2]];
T[0, 0] = 1;
Table[T[n, k], {n, 0, 10}, {k, 0, 2n}] // Flatten (* Jean-François Alcover, Aug 19 2022, after Robert Israel *)
PROG
(PARI) flip(v)=vector(#v, i, v[#v+1-i])
ar(n)={local(p); p=1;
for(k=1, n, p*=1+x+x^3+x^4; p=(p-polcoeff(p, 0)-polcoeff(p, 1)*x)/x^2);
flip(Vec(p))}
CROSSREFS
KEYWORD
nonn,walk,tabf
AUTHOR
Franklin T. Adams-Watters, Mar 10 2011
STATUS
approved