OFFSET
1,6
COMMENTS
The swell of a multiset partition is the set of possible joins of its connected submultisets, where the multiplicity of a vertex in the join of a set of multisets is the maximum multiplicity of the same vertex among the parts. For example the swell of {{1,1},{1,2},{2,2}} is:
{1,1}
{1,2}
{2,2}
{1,1,2}
{1,2,2}
{1,1,2,2}
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
zwell[y_]:=Union[y, Join@@Cases[Subsets[Union[y], {2}], {x_, z_}?(GCD@@#>1&):>zwell[Sort[Append[Fold[DeleteCases[#1, #2, {1}, 1]&, y, {x, z}], LCM[x, z]]]]]];
Table[Length[zwell[primeMS[n]]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 03 2018
STATUS
approved