28
1
Given a positive number n, output all distinct multiplicative partitions of n in any convenient format.
A multiplicative partition of n is a set of integers, all greater than one, such that their product is n. For example, 20 has the following distinct multiplicative partitions:
2 * 2 * 5
2 * 10
4 * 5
20
Order does not matter, so 2 * 2 * 5
is the same partition as 2 * 5 * 2
.
Examples:
1 -> {}
2 -> {2}
4 -> {2, 2}, {4}
20 -> {2, 2, 5}, {2, 10}, {4, 5}, {20}
84 -> {2, 2, 3, 7}, {2, 2, 21}, {2, 14, 3}, {2, 6, 7}, {2, 42}, {4, 3, 7}, {28, 3}, {4, 21}, {6, 14}, {12, 7}, {84}
Related OEIS sequence. – Martin Ender – 2016-12-26T23:05:42.187
Related – miles – 2017-01-25T10:36:06.073