OFFSET
1,2
COMMENTS
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Given a finite set S of positive integers greater than one, let G(S) be the simple labeled graph with vertex set S and edges between any two vertices with a common divisor greater than 1. For example, G({6,14,15,35}) is a 4-cycle. A partition y is said to be connected if G(U(y + 1)) is a connected graph, where U(y + 1) is the set of distinct successors of the parts of y.
This is intended to be a cleaner form of A305078, where the treatment of empty multisets is arbitrary.
EXAMPLE
The sequence of entries together with the corresponding twice-prime-factored multiset partitions (see A275024) begins:
1: {}
2: {{1}}
3: {{2}}
4: {{1},{1}}
5: {{1,1}}
7: {{3}}
8: {{1},{1},{1}}
9: {{2},{2}}
10: {{1},{1,1}}
11: {{1,2}}
13: {{4}}
16: {{1},{1},{1},{1}}
17: {{1,1,1}}
19: {{2,2}}
20: {{1},{1},{1,1}}
22: {{1},{1,2}}
MATHEMATICA
primeMS[n_]:=If[n===1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
zsm[s_]:=With[{c=Select[Tuples[Range[Length[s]], 2], And[Less@@#, GCD@@s[[#]]]>1&]}, If[c=={}, s, zsm[Union[Append[Delete[s, List/@c[[1]]], LCM@@s[[c[[1]]]]]]]]];
Select[Range[300], Length[zsm[primeMS[#]+1]]<=1&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 03 2018
STATUS
approved