OFFSET
0,5
COMMENTS
Given an integer partition y of length k, let G(y) be the simple labeled graph with vertices {1..k} and edges between any two vertices i, j such that GCD(y_i, y_j) > 1. For example, G(6,14,15,35) is a 4-cycle. A partition y is said to be connected if G(y) is a connected graph.
EXAMPLE
The a(n) partitions for n = 1, 4, 6, 10, 12, 14:
(1) (4) (6) (10) (12) (14)
(2,2) (3,3) (5,5) (6,6) (7,7)
(2,2,2) (6,4) (4,4,4) (8,6)
(2,2,2,2,2) (3,3,3,3) (10,4)
(2,2,2,2,2,2) (6,4,4)
(2,2,2,2,2,2,2)
MATHEMATICA
stableQ[u_, Q_]:=!Apply[Or, Outer[#1=!=#2&&Q[#1, #2]&, u, u, 1], {0, 1}];
zsm[s_]:=With[{c=Select[Subsets[Range[Length[s]], {2}], GCD@@s[[#]]>1&]}, If[c=={}, s, zsm[Sort[Append[Delete[s, List/@c[[1]]], LCM@@s[[c[[1]]]]]]]]];
Table[Length[Select[IntegerPartitions[n], stableQ[#, Divisible]&&Length[zsm[#]]<=1&]], {n, 0, 30}]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Nov 18 2019
STATUS
approved