login
Triangle read by rows: T(n,k) = total number of parts <= k of all partitions of n.
6

%I #21 Mar 11 2015 11:36:26

%S 1,2,3,4,5,6,7,10,11,12,12,16,18,19,20,19,27,31,33,34,35,30,41,47,50,

%T 52,53,54,45,64,73,79,82,84,85,86,67,93,108,116,121,124,126,127,128,

%U 97,138,159,172,180,185,188,190,191,192

%N Triangle read by rows: T(n,k) = total number of parts <= k of all partitions of n.

%C Row n lists the partial sums of row n of triangle A066633.

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

%F T(n,k) = Sum_{j=1..k} A066633(n,j).

%e Triangle begins:

%e 1;

%e 2, 3;

%e 4, 5, 6;

%e 7, 10, 11, 12;

%e 12, 16, 18, 19, 20;

%e 19, 27, 31, 33, 34, 35;

%e 30, 41, 47, 50, 52, 53, 54;

%e 45, 64, 73, 79, 82, 84, 85, 86;

%e 67, 93, 108, 116, 121, 124, 126, 127, 128;

%p p:= (f, g)-> zip((x, y)-> x+y, f, g, 0):

%p b:= proc(n, i) option remember; local f, g;

%p if n=0 then [1]

%p elif i=1 then [1, n]

%p else f:= b(n, i-1); g:= `if`(i>n, [0], b(n-i, i));

%p p (p (f, g), [0$i, g[1]])

%p fi

%p end:

%p T:= proc(n, k) option remember;

%p b(n, n)[k+1] +`if`(k<2, 0, T(n, k-1))

%p end:

%p seq (seq (T(n,k), k=1..n), n=1..11); # _Alois P. Heinz_, May 02 2012

%t p[f_, g_] := With[{m = Max[Length[f], Length[g]]}, PadRight[f, m, 0] + PadRight[g, m, 0]]; b[n_, i_] := b[n, i] = Module[{f, g}, If[n == 0, {1}, If[i == 1, {1, n}, f = b[n, i-1]; g = If[i>n, {0}, b[n-i, i]]; p[p[f, g], Append[Array[0&, i], g[[1]] ]]]]]; T[n_, k_] := T[n, k] = b[n, n][[k+1]] + If[k<2, 0, T[n, k-1]]; Table [Table [T[n, k], {k, 1, n}], {n, 1, 11}] // Flatten (* _Jean-François Alcover_, Mar 11 2015, after _Alois P. Heinz_ *)

%Y Column 1 is A000070(n-1). Right border gives A006128.

%Y Cf. A066633, A181187, A206563, A210948, A210955.

%K nonn,tabl

%O 1,2

%A _Omar E. Pol_, May 01 2012