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!)
A327584 Number T(n,k) of colored compositions of n using all colors of a k-set such that all parts have different color patterns and the patterns for parts i have i distinct colors in increasing order; triangle T(n,k), k>=0, k<=n<=k*2^(k-1), read by columns. 5

%I #25 Feb 22 2021 09:22:14

%S 1,1,3,4,6,13,48,150,300,666,936,1824,2520,2160,5040,75,536,2820,

%T 11144,41346,131304,420084,1191552,3427008,9207456,23466720,61522560,

%U 141553560,345346560,777152160,1635096960,3700806480,6998261760,14211912960,27442437120

%N Number T(n,k) of colored compositions of n using all colors of a k-set such that all parts have different color patterns and the patterns for parts i have i distinct colors in increasing order; triangle T(n,k), k>=0, k<=n<=k*2^(k-1), read by columns.

%C T(n,k) is defined for all n>=0 and k>=0. The triangle displays only positive terms. All other terms are zero.

%H Alois P. Heinz, <a href="/A327584/b327584.txt">Columns k = 0..7, flattened</a>

%e T(3,2) = 4: 2ab1a, 2ab1b, 1a2ab, 1b2ab.

%e T(3,3) = 13: 3abc, 2ab1c, 2ac1b, 2bc1a, 1a2bc, 1b2ac, 1c2ab, 1a1b1c, 1a1c1b, 1b1a1c, 1b1c1a, 1c1a1b, 1c1b1a.

%e T(4,2) = 6: 2ab1a1b, 1a2ab1b, 1a1b2ab, 2ab1b1a, 1b2ab1a, 1b1a2ab.

%e Triangle T(n,k) begins:

%e 1;

%e 1;

%e 3;

%e 4, 13;

%e 6, 48, 75;

%e 150, 536, 541;

%e 300, 2820, 6320, 4683;

%e 666, 11144, 50150, 81012, 47293;

%e 936, 41346, 308080, 903210, 1134952, 545835;

%e ...

%p C:= binomial:

%p g:= proc(n) option remember; n*2^(n-1) end:

%p h:= proc(n) option remember; local k; for k from

%p `if`(n=0, 0, h(n-1)) do if g(k)>=n then return k fi od

%p end:

%p b:= proc(n, i, k, p) option remember; `if`(n=0, p!,

%p `if`(i<1 or k<h(n), 0, add(b(n-i*j, min(n-i*j, i-1),

%p k, p+j)*C(C(k, i), j), j=0..n/i)))

%p end:

%p T:= (n, k)-> add(b(n$2, i, 0)*(-1)^(k-i)*C(k, i), i=0..k):

%p seq(seq(T(n, k), n=k..k*2^(k-1)), k=0..5);

%t c = Binomial;

%t g[n_] := g[n] = n*2^(n - 1);

%t h[n_] := h[n] = Module[{k}, For[k = If[n == 0, 0,

%t h[n - 1]], True, k++, If[g[k] >= n, Return[k]]]];

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

%t If[i < 1 || k < h[n], 0, Sum[b[n - i*j, Min[n - i*j, i - 1],

%t k, p + j]*c[c[k, i], j], {j, 0, n/i}]]];

%t T[n_, k_] := Sum[b[n, n, i, 0]*(-1)^(k - i)*c[k, i], {i, 0, k}];

%t Table[Table[T[n, k], {n, k, k*2^(k - 1)}], {k, 0, 5}] // Flatten (* _Jean-François Alcover_, Feb 22 2021, after _Alois P. Heinz_ *)

%Y Main diagonal gives A000670.

%Y Row sums give A321587.

%Y Column sums give A327585.

%Y Cf. A001787, A326962, A327583 (this triangle read by rows).

%K nonn,tabf

%O 0,3

%A _Alois P. Heinz_, Sep 17 2019

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 July 14 12:26 EDT 2024. Contains 374318 sequences. (Running on oeis4.)