OFFSET
1,2
EXAMPLE
Array begins:
k=1: k=2: k=3: k=4: k=5: k=6:
n=1: 1 1 1 1 1 1
n=2: 2 4 6 8 10 12
n=3: 3 10 21 36 55 78
n=4: 5 33 104 238 455 775
n=5: 7 91 452 1430 3505 7297
n=6: 11 298 2335 10179 31881 80897
Non-isomorphic representatives of the A(3,3) = 21 multiset partitions:
{{111}} {{112}} {{123}}
{{1}{11}} {{1}{12}} {{1}{23}}
{{1}}{{11}} {{2}{11}} {{1}}{{23}}
{{1}{1}{1}} {{1}}{{12}} {{1}{2}{3}}
{{1}}{{1}{1}} {{1}{1}{2}} {{1}}{{2}{3}}
{{1}}{{1}}{{1}} {{2}}{{11}} {{1}}{{2}}{{3}}
{{1}}{{1}{2}}
{{2}}{{1}{1}}
{{1}}{{1}}{{2}}
MATHEMATICA
sps[{}]:={{}}; sps[set:{i_, ___}]:=Join@@Function[s, Prepend[#, s]&/@sps[Complement[set, s]]]/@Cases[Subsets[set], {i, ___}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
undats[m_]:=Union[DeleteCases[Cases[m, _?AtomQ, {0, Infinity}, Heads->True], List]];
expnorm[m_]:=If[Length[undats[m]]==0, m, If[undats[m]!=Range[Max@@undats[m]], expnorm[m/.Apply[Rule, Table[{undats[m][[i]], i}, {i, Length[undats[m]]}], {1}]], First[Sort[expnorm[m, 1]]]]];
expnorm[m_, aft_]:=If[Length[undats[m]]<=aft, {m}, With[{mx=Table[Count[m, i, {0, Infinity}, Heads->True], {i, Select[undats[m], #1>=aft&]}]}, Union@@(expnorm[#1, aft+1]&)/@Union[Table[MapAt[Sort, m/.{par+aft-1->aft, aft->par+aft-1}, Position[m, _[___]]], {par, First/@Position[mx, Max[mx]]}]]]];
strnorm[n_]:=(Flatten[MapIndexed[Table[#2, {#1}]&, #1]]&)/@IntegerPartitions[n];
kmp[n_, k_]:=kmp[n, k]=If[k==1, strnorm[n], Union[expnorm/@Join@@mps/@kmp[n, k-1]]];
Table[Length[kmp[sum-k, k]], {sum, 1, 7}, {k, 1, sum-1}]
CROSSREFS
KEYWORD
AUTHOR
Gus Wiseman, Jan 27 2019
EXTENSIONS
a(46)-a(56) from Robert Price, May 11 2021
STATUS
approved