login
A320423
Number of set partitions of {1,...,n} where each block's elements are pairwise coprime.
8
1, 1, 1, 2, 2, 8, 4, 28, 18, 120, 60, 888, 252, 5220, 1860, 22224, 9552, 311088, 59616
OFFSET
0,4
COMMENTS
Two or more numbers are pairwise coprime if no pair of them has a common divisor > 1. A single number is not considered to be pairwise coprime unless it is equal to 1.
EXAMPLE
The a(5) = 8 set partitions:
{{1},{2,3},{4,5}}
{{1},{2,5},{3,4}}
{{1,2},{3,4,5}}
{{1,4},{2,3,5}}
{{1,2,3},{4,5}}
{{1,2,5},{3,4}}
{{1,3,4},{2,5}}
{{1,4,5},{2,3}}
MATHEMATICA
spsu[_, {}]:={{}}; spsu[foo_, set:{i_, ___}]:=Join@@Function[s, Prepend[#, s]&/@spsu[Select[foo, Complement[#, Complement[set, s]]=={}&], Complement[set, s]]]/@Cases[foo, {i, ___}];
Table[Length[spsu[Select[Subsets[Range[n]], CoprimeQ@@#&], Range[n]]], {n, 10}]
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Jan 08 2019
EXTENSIONS
a(17)-a(18) from Alois P. Heinz, Jan 17 2019
STATUS
approved