login
Triangle read by rows: T(n,k) is the number of partitions of n having exactly k parts that appear exactly once (n>=0, k>=0).
5

%I #15 Sep 12 2016 15:45:56

%S 1,0,1,1,1,1,1,1,2,2,1,1,4,2,4,4,2,1,2,8,4,1,6,8,6,2,5,12,10,3,9,16,

%T 12,4,1,7,23,19,6,1,16,24,25,10,2,11,40,33,14,3,22,45,41,22,5,20,59,

%U 63,27,6,1,33,72,73,42,10,1,28,99,101,53,14,2,51,108,127,75,21,3,42,153,167

%N Triangle read by rows: T(n,k) is the number of partitions of n having exactly k parts that appear exactly once (n>=0, k>=0).

%C Row n has 1+floor([sqrt(1+8n)-1]/2) terms. Row sums yield the partition numbers (A000041). T(n,0)=A007690(n). Sum(k*T(n,k),k>=0)=A024786(n+1).

%H Alois P. Heinz, <a href="/A116595/b116595.txt">Rows n = 0..500, flattened</a>

%F G.f.: product(1+tx^j+x^(2j)/(1-x^j), j=1..infinity).

%F More generally, g.f. for the number of partitions of n having exactly k parts that appear exactly m times is product((t-1)*x^(m*j)+1/(1-x^j), j=1..infinity). - _Vladeta Jovovic_, Feb 21 2006

%e T(7,2) = 4 because we have [6,1], [5,2], [4,3], [3,2,1,1].

%e Triangle starts:

%e 1;

%e 0, 1;

%e 1, 1;

%e 1, 1, 1;

%e 2, 2, 1;

%e 1, 4, 2;

%e 4, 4, 2, 1;

%e 2, 8, 4, 1;

%e 6, 8, 6, 2;

%e 5, 12, 10, 3;

%e 9, 16, 12, 4, 1;

%p g:=product(1+t*x^j+x^(2*j)/(1-x^j),j=1..40): gser:=simplify(series(g,x=0,23)): P[0]:=1: for n from 1 to 21 do P[n]:=sort(coeff(gser,x^n)) od: for n from 0 to 21 do seq(coeff(P[n],t,j),j=0..floor((sqrt(1+8*n)-1)/2)) od; # yields sequence in triangular form

%p # second Maple program:

%p b:= proc(n, i) option remember; local j; if n=0 then 1

%p elif i<1 then 0 else []; for j from 0 to n/i do zip((x, y)

%p ->x+y, %, [`if`(j=1, 0, [][]), b(n-i*j, i-1)], 0) od; %[] fi

%p end:

%p T:= n-> b(n, n):

%p seq(T(n), n=0..30); # _Alois P. Heinz_, Nov 07 2012

%t b[n_, i_] := b[n, i] = Module[{j, pc}, If[n == 0, pc = {1}, If[i<1, pc = {0}, pc = {}; For[j = 0, j <= n/i, j++, pc = Plus @@ PadRight[{pc, If[j == 1, {0}, {}] ~Join~ b[n-i*j, i-1]}]]; pc]]]; T[n_] := b[n, n]; Table[T[n], {n, 0, 30}] // Flatten (* _Jean-François Alcover_, Jan 31 2014, after _Alois P. Heinz_ *)

%Y Cf. A000041, A007690, A024786.

%K nonn,tabf

%O 0,9

%A _Emeric Deutsch_, Feb 18 2006