OFFSET
0,3
COMMENTS
Number of sets of nonempty multisets of nonempty multisets of positive integers with total sum n.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..3853
FORMULA
Weigh transform of A001970. The weigh transform of a sequence (s_1, s_2, ...) is the sequence with generating function Product_{i > 0} (1 + x^i)^s_i.
EXAMPLE
The a(4) = 23 partitions:
((4)) ((22)) ((31)) ((211)) ((1111))
((2)(2)) ((1)(3)) ((1)(21)) ((1)(111))
((1))((3)) ((2)(11)) ((11)(11))
((1)(1)(2)) ((1))((111))
((1))((21)) ((1)(1)(11))
((2))((11)) ((1))((1)(11))
((1))((1)(2)) ((1)(1)(1)(1))
((2))((1)(1)) ((11))((1)(1))
((1))((1)(1)(1))
MAPLE
with(numtheory): with(combinat):
b:= proc(n) option remember; `if`(n=0, 1, add(add(d*
numbpart(d), d=divisors(j))*b(n-j), j=1..n)/n)
end:
a:= proc(n) a(n):= `if`(n<2, 1, add(a(n-k)*add(b(d)
*d*(-1)^(k/d+1), d=divisors(k)), k=1..n)/n)
end:
seq(a(n), n=0..32); # Alois P. Heinz, Jul 18 2021
MATHEMATICA
ppl[n_, k_]:=Switch[k, 0, {n}, 1, IntegerPartitions[n], _, Join@@Table[Union[Sort/@Tuples[ppl[#, k-1]&/@ptn]], {ptn, IntegerPartitions[n]}]];
Table[Length[Select[ppl[n, 3], UnsameQ@@#&]], {n, 0, 10}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 17 2019
STATUS
approved