login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261838 Number of compositions of n into distinct parts where each part i is marked with a word of length i over a k-ary alphabet (k=1,2,3,...) whose letters appear in alphabetical order and all k letters occur at least once in the composition. 3

%I #14 Feb 25 2017 03:00:22

%S 1,1,2,20,48,264,4296,14528,89472,593248,19115360,75604544,599169408,

%T 4141674240,40147321344,2159264715776,10240251475456,92926573965184,

%U 746025520714112,7285397378650112,82900557619046912,7796186873306241024,41825012467664893440

%N Number of compositions of n into distinct parts where each part i is marked with a word of length i over a k-ary alphabet (k=1,2,3,...) whose letters appear in alphabetical order and all k letters occur at least once in the composition.

%C Also number of matrices with nonnegative integer entries and without zero rows or columns such that sum of all entries is equal to n and the column sums are distinct.

%C a(2) = 2:

%C [1] [2]

%C [1]

%H Alois P. Heinz, <a href="/A261838/b261838.txt">Table of n, a(n) for n = 0..300</a>

%e a(0) = 1: the empty composition.

%e a(1) = 1: 1a.

%e a(2) = 2: 2aa (for k=1), 2ab (for k=2).

%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-> add(add(b(n$2, 0, k-i)*(-1)^i*binomial(k, i), i=0..k), k=0..n):

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

%t b[n_, i_, p_, k_] := b[n, i, p, k] = If[i*(i+1)/2 < n, 0, If[n == 0, p!, b[n, i-1, p, k] + If[i>n, 0, b[n-i, i-1, p+1, k]*Binomial[i+k-1, k-1]]]]; a[n_] := Sum[b[n, n, 0, k-i]*(-1)^i*Binomial[k, i], {k, 0, n}, {i, 0, k}]; Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Feb 25 2017, translated from Maple *)

%Y Row sums of A261836.

%Y Cf. A120733.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Sep 02 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:28 EDT 2024. Contains 371927 sequences. (Running on oeis4.)