OFFSET
0,4
COMMENTS
T(n,k) is odd if and only if n = 2^i-1 for i in {0, 1, 2, ... } = A001477.
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
S. B. Ekhad, D. Zeilberger, Computational and Theoretical Challenges on Counting Solid Standard Young Tableaux, arXiv:1202.6229v1 [math.CO], 2012
Wikipedia, Young tableau
EXAMPLE
Triangle T(n,k) begins:
1;
1, 1;
2, 6, 2;
5, 25, 25, 5;
14, 98, 174, 98, 14;
42, 378, 962, 962, 378, 42;
132, 1452, 4804, 7020, 4804, 1452, 132;
...
MAPLE
b:= proc(x, y, z) option remember; `if`(z>y, b(x, z, y),
`if`({x, y, z}={0}, 1, `if`(x>y and x>z, b(x-1, y, z), 0)+
`if`(y>0, b(x, y-1, z), 0)+ `if`(z>0, b(x, y, z-1), 0)))
end:
T:= (n, k)-> b(n, k, n-k):
seq(seq(T(n, k), k=0..n), n=0..10);
MATHEMATICA
b[x_, y_, z_] := b[x, y, z] = If[z>y, b[x, z, y], If[Union[{x, y, z}] == {0}, 1, If[x>y && x>z, b[x-1, y, z], 0] + If[y>0, b[x, y-1, z], 0] + If[z>0, b[x, y, z-1], 0]]]; T[n_, k_] := b[n, k, n-k]; Table[T[n, k] , {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 15 2014, translated from Maple *)
PROG
(Sage)
@CachedFunction
def B(x, y, z) :
if z > y : return B(x, z, y)
if x==y and y==z and z==0 : return 1
a = B(x-1, y, z) if x>y and x>z else 0
b = B(x, y-1, z) if y>0 else 0
c = B(x, y, z-1) if z>0 else 0
return a + b + c
T = lambda n, k: B(n, k, n-k)
[[T(n, k) for k in (0..n)] for n in (0..10)]
# After Maple code of Alois P. Heinz. Peter Luschny, Jul 30 2012
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Jul 28 2012
STATUS
approved