login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of compositions of n into distinct parts where each part i is marked with a word of length i over an n-ary alphabet whose letters appear in alphabetical order.
2

%I #7 Jul 12 2021 13:47:44

%S 1,1,3,46,195,1876,51114,322764,3644355,43916950,2427338628,

%T 18277511616,272107762602,3507931293608,62485721142820,

%U 5810222040368296,53025343448015811,913540133071336044,13871534219465464002,253750203721349071650,5307815745011707670820

%N Number of compositions of n into distinct parts where each part i is marked with a word of length i over an n-ary alphabet whose letters appear in alphabetical order.

%H Alois P. Heinz, <a href="/A261837/b261837.txt">Table of n, a(n) for n = 0..500</a>

%F a(n) = A261835(n,n).

%p b:= proc(n, i, p, k) option remember;

%p `if`(i*(i+1)/2<n, 0, `if`(n=0, p!, b(n, i-1, p, k)+

%p `if`(i>n, 0, b(n-i, i-1, p+1, k)*binomial(i+k-1, k-1))))

%p end:

%p a:= n-> b(n$2, 0, n):

%p seq(a(n), n=0..30);

%t b[n_, i_, p_, k_] := b[n, i, p, k] =

%t If[i (i + 1)/2 < n, 0, If[n == 0, p!, b[n, i - 1, p, k] +

%t If[i > n, 0, b[n - i, i - 1, p + 1, k]*Binomial[i + k - 1, k - 1]]]];

%t a[n_] := b[n, n, 0, n];

%t Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Jul 12 2021, after _Alois P. Heinz_ *)

%Y Main diagonal of A261835.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Sep 02 2015