OFFSET
0,8
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10010
MAPLE
T:= proc(n, k) option remember;
local t;
if n<1 or k<1 then 0
elif n=1 and k=1 then 1
elif n=1 and irem(k, 2)=1 or k=1 and irem(n, 2)=0 then 0
else t:= 1-2*irem(n+k, 2);
T(n-t, k+t) + T(n, k-1)+T(n-1, k)
fi
end:
seq (`if` (irem(d, 2)=1,
seq (T(d-k, k), k=1..d-1),
seq (T(n, d-n), n=1..d-1)), d=2..11); # Alois P. Heinz, Feb 08 2011
MATHEMATICA
T[n_, k_] := T[n, k] = Module[{t}, Which[n<1 || k<1, 0, n == 1 && k == 1, 1, n == 1 && Mod[k, 2] == 1 || k == 1 && Mod[n, 2] == 0, 0, True, t = 1 - 2*Mod[n+k, 2]; T[n-t, k+t] + T[n, k-1] + T[n-1, k]]]; Table[If[Mod[d, 2] == 1, Table[T[d-k, k], {k, 1, d-1}], Table[T[n, d-n], {n, 1, d-1}]], {d, 2, 11}] // Flatten (* Jean-François Alcover, Jan 14 2014, translated from Alois P. Heinz's Maple code *)
CROSSREFS
KEYWORD
AUTHOR
N. J. A. Sloane, May 29 2005
EXTENSIONS
More terms from Alois P. Heinz, Feb 08 2011
STATUS
approved