login
Number of ways to shuffle together a multiset of compositions to form a composition of n.
25

%I #7 Sep 16 2018 21:42:49

%S 1,3,8,25,76,248,806,2714,9205,31846,111185,393224

%N Number of ways to shuffle together a multiset of compositions to form a composition of n.

%e The a(3)=8 shuffles are:

%e (111)<=((111)), (111)<=((1)(11)), (111)<=((1)(1)(1)),

%e (12)<=((12)), (12)<=((1)(2)),

%e (21)<=((21)), (21)<=((1)(2)),

%e (3)<=((3)).

%t nn=10;

%t comps[0]:={{}};comps[n_]:=Join@@Table[Prepend[#,i]&/@comps[n-i],{i,n}];

%t sps[{}]:={{}};sps[set:{i_,___}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,___}];

%t dealings[q_]:=Union[Function[ptn,Sort[q[[#]]&/@ptn]]/@sps[Range[Length[q]]]];

%t Table[Total[Length/@dealings/@comps[n]],{n,nn}]

%Y Cf. A034691, A059966, A060223, A269134.

%K nonn,more

%O 1,2

%A _Gus Wiseman_, Sep 26 2017

%E a(12) from _Robert Price_, Sep 16 2018