OFFSET
0,2
COMMENTS
For [a,1,1,...1] one gets A093694, number of one-element transitions from the partitions of n to the partitions of n+1 for labeled parts.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Thomas Wieder, Multiselection (2nd approach)
EXAMPLE
For n=4 we have the multiset [a,a,1,1,1,1] with the following a(4) = 33 ordered set partitions:
For [4] one gets [[1,1,1,1]], [[1,1,1,a]], [[1,1,a,a]].
For [3,1] one gets [[1,1,1],[1]], [[1,1,1],[a]], [[1,1,a],[1]], [[1,1,a],[a]], [[1,a,a],[1]].
For [2,2] one gets [[1,1],[1,1]], [[1,1],[1,a]], [[1,1],[a,a]], [[1,a],[1,1]], [[1,a],[1,a]], [[a,a],[1,1]].
For [2,1,1] one gets [[1,1],[1],[1]], [[1,1],[1],[a]], [[1,1],[a],[1]], [[1,1],[a],[a]], [[1,a],[1],[1]], [[1,a],[1],[a]], [[1,a],[a],[1]], [[a,a],[1],[1]].
For [1,1,1,1] one gets [[1],[1],[1],[1]], [[1],[1],[1],[a]], [[1],[1],[a],[1]], [[1],[1],[a],[a]], [[1],[a],[1],[1]], [[1],[a],[1],[a]], [[1],[a],[a],[1]], [[a],[1],[1],[1]], [[a],[1],[1],[a]], [[a],[1],[a],[1]], [[a],[a],[1],[1]].
MAPLE
p:= (f, g)-> zip((x, y)-> x+y, f, g, 0):
b:= proc(n, i) option remember; local f, g;
if n=0 then [1, 0, [1]]
elif i<1 then [0, 0, [0]]
else f:= b(n, i-1); g:= `if`(i>n, [0, 0, [0]], b(n-i, i));
[f[1]+g[1], f[2]+g[2] +`if`(i>1, g[1], 0), p(f[3], [0, g[3][]])]
fi
end:
a:= proc(n) local l, ll;
if n=0 then return 1 fi;
l:= b(n, n); ll:= l[3];
l[2] +add(ll[t+1] *(1+t* (1+(t-1)/2)), t=1..nops(ll)-1)
end:
seq(a(n), n=0..50); # Alois P. Heinz, Mar 11 2012
MATHEMATICA
zip = With[{m = Max[Length[#1], Length[#2]]}, PadRight[#1, m] + PadRight[#2, m]]&; b[n_, i_] := b[n, i] = Module[{f, g}, Which[n == 0, {1, 0, {1}}, i<1, {0, 0, {0}}, True, f = b[n, i-1]; g = If[i>n, {0, 0, {0}}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + If[i>1, g[[1]], 0], zip[f[[3]], Join[{0}, g[[3]]]]}]]; a[n_] := Module[{l, ll}, If[n == 0, Return[1]]; l = b[n, n]; ll = l[[3]]; l[[2]] + Sum[ll[[t+1]]*(1+t*(1+(t-1)/2)), {t, 1, Length[ll]-1}]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 13 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Wieder, Mar 11 2012
EXTENSIONS
More terms from Alois P. Heinz, Mar 11 2012
STATUS
approved