OFFSET
1,3
COMMENTS
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
EXAMPLE
a(30) = 9 because the maximum number that can be obtained starting with (3,2,1) is 3*(2+1) = 9.
MATHEMATICA
ReplaceListRepeated[forms_, rerules_]:=Union[Flatten[FixedPointList[Function[pre, Union[Flatten[ReplaceList[#, rerules]&/@pre, 1]]], forms], 1]];
nexos[ptn_]:=If[Length[ptn]==0, {0}, Union@@Select[ReplaceListRepeated[{Sort[ptn]}, {{foe___, x_, mie___, y_, afe___}:>Sort[Append[{foe, mie, afe}, x+y]], {foe___, x_, mie___, y_, afe___}:>Sort[Append[{foe, mie, afe}, x*y]]}], Length[#]==1&]];
Table[Max[nexos[If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]]]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
_Gus Wiseman_, Sep 29 2018
STATUS
approved