OFFSET
1,5
COMMENTS
The maximal square contained in the Young diagram of an integer partition is called its Durfee square, and its length is the rank of the partition.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
REFERENCES
Richard P. Stanley, Enumerative Combinatorics, Volume 2, Cambridge University Press, 1999, p. 289.
LINKS
Wikipedia, Durfee square.
EXAMPLE
The partition (3,3,2,1) has Heinz number 150 and diagram
o o o
o o o
o o
o
containing maximal square
o o
o o
and contained in minimal square
o o o o
o o o o
o o o o
o o o o
so a(150) = 4 - 2 = 2.
MATHEMATICA
durf[n_]:=Length[Select[Range[PrimeOmega[n]], Reverse[Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]][[#]]>=#&]];
codurf[n_]:=If[n==1, 0, Max[PrimeOmega[n], PrimePi[FactorInteger[n][[-1, 1]]]]];
Table[codurf[n]-durf[n], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Apr 08 2019
STATUS
approved