login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number T(n,k) of compositions of n into parts with distinct multiplicities and with exactly k parts; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
13

%I #23 Aug 31 2019 22:25:48

%S 1,0,1,0,1,1,0,1,0,1,0,1,1,3,1,0,1,0,6,4,1,0,1,1,4,4,5,1,0,1,0,9,8,15,

%T 6,1,0,1,1,9,5,15,21,7,1,0,1,0,10,8,20,6,28,8,1,0,1,1,12,12,6,96,42,

%U 36,9,1,0,1,0,15,12,30,192,168,64,45,10,1,0,1,1,13,9,20,142,238,204,93,55,11,1

%N Number T(n,k) of compositions of n into parts with distinct multiplicities and with exactly k parts; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

%H Alois P. Heinz, <a href="/A242887/b242887.txt">Rows n = 0..140, flattened</a>

%e T(5,1) = 1: [5].

%e T(5,3) = 6: [1,2,2], [2,1,2], [2,2,1], [1,1,3], [1,3,1], [3,1,1].

%e T(5,4) = 4: [1,1,1,2], [1,1,2,1], [1,2,1,1], [2,1,1,1].

%e T(5,5) = 1: [1,1,1,1,1].

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 0, 1, 1;

%e 0, 1, 0, 1;

%e 0, 1, 1, 3, 1;

%e 0, 1, 0, 6, 4, 1;

%e 0, 1, 1, 4, 4, 5, 1;

%e 0, 1, 0, 9, 8, 15, 6, 1;

%e 0, 1, 1, 9, 5, 15, 21, 7, 1;

%e 0, 1, 0, 10, 8, 20, 6, 28, 8, 1;

%e 0, 1, 1, 12, 12, 6, 96, 42, 36, 9, 1;

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

%p `if`(i<1, 0, expand(add(`if`(j>0 and j in s, 0, x^j*

%p b(n-i*j, i-1,`if`(j=0, s, s union {j}))/j!), j=0..n/i))))

%p end:

%p T:= n-> (p-> seq(coeff(p,x,i), i=0..degree(p)))(b(n$2, {})):

%p seq(T(n), n=0..16);

%t b[n_, i_, s_] := b[n, i, s] = If[n==0, Total[s]!, If[i<1, 0, Expand[Sum[ If[j>0 && MemberQ[s, j], 0, x^j*b[n-i*j, i-1, If[j==0, s, s ~Union~ {j}] ]/j!], {j, 0, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n, {}]]; Table[T[n], {n, 0, 16}] // Flatten (* _Jean-François Alcover_, Feb 08 2017, translated from Maple *)

%o (PARI)

%o T(n)={Vecrev(((r,k,b,w)->if(!k||!r, if(r,0,w!*x^w), sum(m=0, r\k, if(!m || !bittest(b,m), self()(r-k*m, k-1, bitor(b,1<<m), w+m)/m!))))(n,n,1,0))}

%o { for(n=0, 10, print(T(n))) } \\ _Andrew Howroyd_, Aug 31 2019

%Y Columns k=0-10 give: A000007, A057427, A059841 (for n>1), A321773, A321774, A321775, A321776, A321777, A321778, A321779, A321780.

%Y Row sums give A242882.

%Y T(2n,n) gives A321772.

%Y Cf. A242896.

%K nonn,tabl

%O 0,14

%A _Alois P. Heinz_, May 25 2014