A320423 Number of set partitions of {1,...,n} where each block's elements are pairwise coprime.
1, 1, 1, 2, 2, 8, 4, 28, 18, 120, 60, 888, 252, 5220, 1860, 22224, 9552, 311088, 59616, 2473056, 565920, 13627008, 4051872, 235039392, 33805440, 1932037632, 465239808, 20604487680, 4294865664, 386228795904, 35413136640
Offset: 0
Examples
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}}
Crossrefs
Programs
-
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}]
Extensions
a(17)-a(18) from Alois P. Heinz, Jan 17 2019
a(19)-a(30) from Christian Sievers, Nov 28 2024
Comments