OFFSET
1,1
EXAMPLE
The a(3) = 18 sets of set partitions:
0
{{1,2,3}}
{{1,3},{2}}
{{1,2},{3}}
{{1},{2,3}}
{{1},{2},{3}}
{{1,3},{2}} {{1,2,3}}
{{1,2},{3}} {{1,2,3}}
{{1,2},{3}} {{1,3},{2}}
{{1},{2,3}} {{1,2,3}}
{{1},{2,3}} {{1,3},{2}}
{{1},{2,3}} {{1,2},{3}}
{{1},{2},{3}} {{1,2,3}}
{{1,2},{3}} {{1,3},{2}} {{1,2,3}}
{{1},{2,3}} {{1,3},{2}} {{1,2,3}}
{{1},{2,3}} {{1,2},{3}} {{1,2,3}}
{{1},{2,3}} {{1,2},{3}} {{1,3},{2}}
{{1},{2,3}} {{1,2},{3}} {{1,3},{2}} {{1,2,3}}
MATHEMATICA
stableSets[u_, Q_]:=If[Length[u]===0, {{}}, With[{w=First[u]}, Join[stableSets[DeleteCases[u, w], Q], Prepend[#, w]&/@stableSets[DeleteCases[u, r_/; r===w||Q[r, w]||Q[w, r]], Q]]]];
sps[{}]:={{}}; sps[set:{i_, ___}]:=Join@@Function[s, Prepend[#, s]&/@sps[Complement[set, s]]]/@Cases[Subsets[set], {i, ___}];
csm[s_]:=With[{c=Select[Tuples[Range[Length[s]], 2], And[OrderedQ[#], UnsameQ@@#, Length[Intersection@@s[[#]]]>0]&]}, If[c=={}, s, csm[Union[Append[Delete[s, List/@c[[1]]], Union@@s[[c[[1]]]]]]]]];
Table[Length[stableSets[sps[Range[n]], Length[csm[Union[#1, #2]]]>1&]], {n, 4}]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Aug 28 2018
STATUS
approved