I am trying to create a multiplicative partition function that would generate something like
f[12]
(*{{2, 2, 3}, {4, 3}, {6, 2}}*)
f[24]
(*{{2, 2, 2, 3}, {2, 2, 6}, {4, 2, 3}, {8, 3}, {12, 2}, {4, 6}}*)
f[48]
(*{{2, 2, 2, 2, 3}, {2, 2, 2, 6}, {4, 2, 2, 3}, {2, 2, 12}, {2, 3, 8}, {2, 4, 6},
{4, 4, 3}, {6, 8}, {4, 12}, {3, 16}, {2, 24}}*)
I have got as far as
n = 30;
i = FactorInteger[n];
r = Range[Length[i]];
Join[{f = Flatten[Map[Table[i[[#]][[1]], {x, 1, i[[#]][[2]]}] &, r]]},
Transpose[{d = DeleteDuplicates[f], Map[n/d[[#]] &, Range[Length[d]]]}]]
but it is turning out to be more complicated than I thought. Is there a more efficient way of tackling this?
Update
Have got a little further, but still missing some:
n = 48;
i = FactorInteger[n];
r = Range[Length[i]];
f = Flatten[Map[Table[i[[#]][[1]], {x, 1, i[[#]][[2]]}] &, r]];
p = Drop[Drop[DeleteDuplicates[Subsets[f]], 1], -1];
d = Split[Drop[Drop[Reverse[Divisors[n]], 1], -1]];
Drop[Map[Sort[Join[p[[#]], d[[#]]]] &, Range[Length[d]]], -1]
