%I #15 Sep 21 2019 19:04:23
%S 1,1,2,8,29,117,696,4286,25458,156843,1156246,9521096,79140828,
%T 665427791,5610420458,49509430318,475540600965,4831978977077,
%U 51175720976994,552595605354707,5923618798039611,63654533191518745,705094561770919436,8127236135685948103
%N Number of compositions of n where the (possibly scattered) maximal subsequence of part i with multiplicity j is marked with a word of length i*j over an n-ary alphabet whose letters appear in alphabetical order and all n letters occur exactly once in the composition.
%H Alois P. Heinz, <a href="/A261774/b261774.txt">Table of n, a(n) for n = 0..500</a>
%e a(3) = 8: 3abc, 2ab1c, 2ac1b, 2bc1a, 1a2bc, 1b2ac, 1c2ab, 1a1b1c.
%p b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
%p add(b(n-i*j, i-1, p+j)/j!*binomial(n, i*j), j=0..n/i)))
%p end:
%p a:= n-> b(n$2, 0):
%p seq(a(n), n=0..25);
%t b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0, Sum[b[n - i*j, i - 1, p + j]/j!*Binomial[n, i*j], {j, 0, n/i}]]];
%t a[n_] := b[n, n, 0];
%t Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, May 17 2018, translated from Maple *)
%Y Cf. A000670 (parts are marked individually), A178682 (same for partitions), A261777, A327677.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Aug 31 2015
|