OFFSET
0,3
COMMENTS
It appears to be the case that the difference between entry a(2n-1) and a(2n) is substantially less than the difference between a(2n) and a(2n+1), after a few initial exceptions.
EXAMPLE
a(7) = 6, counting the partitions (7), (43), (331), (322), (2221), and (111111). The hooklengths of (7) are {1,2,3,4,5,6,7}, and the hooklengths of (322) are {1,1,2,2,3,4,5}.
MAPLE
h:= proc(l) local n, s; n:=nops(l); s:= {seq(seq(1+l[i]-j
+add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)};
`if`(s={$1..max(s[], 0)}, 1, 0)
end:
g:= (n, i, l)-> `if`(n=0 or i=1, h([l[], 1$n]), `if`(i<1, 0,
g(n, i-1, l)+`if`(i>n, 0, g(n-i, i, [l[], i])))):
a:= n-> g(n$2, []):
seq(a(n), n=0..30); # Alois P. Heinz, Aug 12 2013
MATHEMATICA
<< "Combinatorica`"
HookSet[Lambda_] := Module[{i, j, k, HookHolder},
HookHolder = {};
HS = {};
For[i = 1, i < Length[Lambda] + 1, i++,
For[j = 1, j < Lambda[[i]] + 1, j++,
CurrentHook =
Lambda[[i]] - j + TransposePartition[Lambda][[j]] - i + 1;
If[! MemberQ[HS, CurrentHook],
HookHolder = Append[HS, CurrentHook]; HS = HookHolder]
]
];
HookHolder = Sort[HS];
HS = HookHolder;
Return[HS]]
For[i = 1, i < 31, i++,
For[j = 1, j < PartitionsP[i] + 1, j++,
CurrSet=HookSet[Partitions[i][[j]]];
If[CurrSet == Table[i, {i, 1, Length[CurrSet]}],
SGFHolder = SegGenFn + q^i;
SegGenFn = SGFHolder]
]
]
(* second program: *)
h[l_] := Module[{n, s}, n = Length[l]; s = Table[Table[1 + l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}] // Flatten // Union; If[s == Range[Max[Append[s, 0]]], 1, 0]]; g[n_, i_, l_] := g[n, i, l] = If[n == 0 || i == 1, h[Join[l, Array[1&, n]]], If[i<1, 0, g[n, i-1, l] + If[i>n, 0, g[n-i, i, Append[l, i]]]]]; a[n_] := g[n, n, {}]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 60}] (* Jean-François Alcover, Jan 22 2016, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
William J. Keith, Aug 10 2013
EXTENSIONS
a(31)-a(53) from Alois P. Heinz, Aug 12 2013
STATUS
approved