OFFSET
0,4
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..300
Wikipedia, Young tableau
EXAMPLE
For n=5, we have floor(sqrt(2*n)+1/2) = 3, and a(5) = 5, because there are 5 standard Young tableaux for partitions of 5 into distinct parts with largest part 3:
+---------+ +---------+ +---------+ +---------+ +---------+
| 1 2 3 | | 1 2 4 | | 1 2 5 | | 1 3 4 | | 1 3 5 |
| 4 5 .--+ | 3 5 .--+ | 3 4 .--+ | 2 5 .--+ | 2 4 .--+
+------+ +------+ +------+ +------+ +------+
MAPLE
h:= proc(l) local n; n:=nops(l); add(i, i=l)!/mul(mul(1+l[i]-j+
add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
end:
g:= proc(n, i, l) local s; s:=i*(i+1)/2;
`if`(n=s, h([l[], seq(i-j, j=0..i-1)]), `if`(n>s, 0,
g(n, i-1, l)+ `if`(i>n, 0, g(n-i, i-1, [l[], i]))))
end:
a:= n-> g(n, floor(sqrt(2*n)+1/2), []):
seq(a(n), n=0..30);
MATHEMATICA
h[l_] := (n = Length[l]; Total[l]!/Product[Product[1+l[[i]]-j+Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}]); g[n_, i_, l_] := g[n, i, l] = (s = i*(i+1)/2; If[n==s, h[Join[l, Table[i-j, {j, 0, i-1}]] ], If[n>s, 0, g[n, i-1, l]+If[i>n, 0, g[n-i, i-1, Append[l, i]]]]] ); a[n_] := g[n, Floor[Sqrt[2*n]+1/2], {}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 16 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 18 2012
STATUS
approved