login
Triangle: T(n,k) is the number of partitions of n such that some part is repeated k times and no part is repeated more than k times.
26

%I #29 Feb 13 2022 06:12:56

%S 1,1,1,2,0,1,2,2,0,1,3,2,1,0,1,4,3,2,1,0,1,5,4,3,1,1,0,1,6,7,3,3,1,1,

%T 0,1,8,8,6,3,2,1,1,0,1,10,12,7,5,3,2,1,1,0,1,12,15,11,6,5,2,2,1,1,0,1,

%U 15,21,14,10,5,5,2,2,1,1,0,1,18,26,20,12,9,5,4,2,2,1,1,0,1,22,35,25,18,11,8,5,4,2,2,1,1,0,1

%N Triangle: T(n,k) is the number of partitions of n such that some part is repeated k times and no part is repeated more than k times.

%C From _Gary W. Adamson_, Mar 13 2010: (Start)

%C The triangle by rows = finite differences starting from the top, of an array in which row 1 = p(x)/p(x^2), row 2 = p(x)/p(x^3), ... row k = p(x)/p(x^k); such that p(x) = polcoeff A000041: (1 + x + 2x^2 + 3x^3 + 5x^4 + 7x^5 + ...)

%C Note that p(x)/p(x^2) = polcoeff A000009: (1 + x + x^2 + 2x^3 + 2x^4 + ...).

%C Refer to the example. (End)

%H Alois P. Heinz, <a href="/A091602/b091602.txt">Rows n = 1..141, flattened</a>

%F G.f.: G = G(t,x) = sum(k>=1, t^k*(prod(j>=1, (1-x^((k+1)*j))/(1-x^j) ) -prod(j>=1, (1-x^(k*j))/(1-x^j) ) ) ). - _Emeric Deutsch_, Mar 30 2006

%F Sum_{k=1..n} k * T(n,k) = A264397(n). - _Alois P. Heinz_, Nov 20 2015

%e Triangle starts:

%e 1: 1;

%e 2: 1, 1;

%e 3: 2, 0, 1;

%e 4: 2, 2, 0, 1;

%e 5: 3, 2, 1, 0, 1;

%e 6: 4, 3, 2, 1, 0, 1;

%e 7: 5, 4, 3, 1, 1, 0, 1;

%e 8: 6, 7, 3, 3, 1, 1, 0, 1;

%e 9: 8, 8, 6, 3, 2, 1, 1, 0, 1;

%e 10: 10, 12, 7, 5, 3, 2, 1, 1, 0, 1;

%e 11: 12, 15, 11, 6, 5, 2, 2, 1, 1, 0, 1;

%e 12: 15, 21, 14, 10, 5, 5, 2, 2, 1, 1, 0, 1;

%e 13: 18, 26, 20, 12, 9, 5, 4, 2, 2, 1, 1, 0, 1;

%e 14: 22, 35, 25, 18, 11, 8, 5, 4, 2, 2, 1, 1, 0, 1;

%e ...

%e In the partition 5+2+2+2+1+1, 2 is repeated 3 times, no part is repeated more than 3 times.

%e From _Gary W. Adamson_, Mar 13 2010: (Start)

%e First few rows of the array =

%e ...

%e 1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, ... = p(x)/p(x^2) = A000009

%e 1, 1, 2, 2, 4, 5, 7, 9, 13, 16, 22, ... = p(x)/p(x^3)

%e 1, 1, 2, 3, 4, 6, 9, 12, 16, 22, 29, ... = p(x)/p(x^4)

%e 1, 1, 2, 3, 5, 6, 10, 13, 19, 25, 34, ... = p(x)/p(x^5)

%e 1, 1, 2, 3, 5, 7, 10, 14, 20, 27, 37, ... = p(x)/p(x^6)

%e ...

%e Finally, taking finite differences from the top and deleting the first "1", we obtain triangle A091602 with row sums = A000041 starting with offset 1:

%e 1;

%e 1, 1;

%e 2, 0, 1;

%e 2, 2, 0, 1;

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

%e 4, 3, 2, 1, 0, 1;

%e ...

%e (End)

%p g:=sum(t^k*(product((1-x^((k+1)*j))/(1-x^j),j=1..50)-product((1-x^(k*j))/(1-x^j),j=1..50)),k=1..50): gser:=simplify(series(g,x=0,20)): for n from 1 to 13 do P[n]:=coeff(gser,x^n) od: for n from 1 to 13 do seq(coeff(P[n],t^j),j=1..n) od;

%p # yields sequence in triangular form - _Emeric Deutsch_, Mar 30 2006

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

%p `if`(i>n, 0, add(b(n-i*j, i+1, min(k,

%p iquo(n-i*j, i+1))), j=0..min(n/i, k))))

%p end:

%p T:= (n, k)-> b(n, 1, k) -`if`(k=0, 0, b(n, 1, k-1)):

%p seq(seq(T(n, k), k=1..n), n=1..20);

%p # _Alois P. Heinz_, Nov 27 2013

%t b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i>n, 0, Sum[b[n-i*j, i+1, Min[k, Quotient[n-i*j, i+1]]], {j, 0, Min[n/i, k]}]]]; t[n_, k_] := b[n, 1, k] - If[k == 0, 0, b[n, 1, k-1]]; Table[t[n, k], {n, 1, 20}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Jan 17 2014, after _Alois P. Heinz_'s second Maple program *)

%Y Row sums: A000041. Inverse: A091603. Square: A091604.

%Y Columns 1-6: A000009, A091605-A091609. Convergent of columns: A002865.

%Y Cf. A000009. - _Gary W. Adamson_, Mar 13 2010

%Y T(2n,n) gives: A232697.

%Y Cf. A213177, A264397.

%K nonn,tabl

%O 1,4

%A _Christian G. Bower_, Jan 23 2004