login
Triangle read by rows: T(n,k) is the number of partitions of n with k parts in which no part occurs more than 3 times (n>=1, k>=1).
4

%I #15 Feb 24 2016 09:33:37

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

%T 5,8,9,5,1,1,5,10,11,8,3,1,6,12,14,11,5,1,1,6,14,18,15,8,2,1,7,16,23,

%U 20,11,4,1,7,19,27,27,17,6,1,1,8,21,33,34,23,10,2,1,8,24,39,43,32,15,4,1,9

%N Triangle read by rows: T(n,k) is the number of partitions of n with k parts in which no part occurs more than 3 times (n>=1, k>=1).

%C Row n has floor(sqrt(6n+6)-3/2) terms. Row sums yield A001935. Sum(k*T(n,k),k>=0) = A117148(n).

%H Alois P. Heinz, <a href="/A117147/b117147.txt">Rows n = 1..350, flattened</a>

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

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

%e Triangle starts:

%e 1;

%e 1, 1;

%e 1, 1, 1;

%e 1, 2, 1;

%e 1, 2, 2, 1;

%e 1, 3, 3, 2;

%e 1, 3, 4, 3, 1;

%p g:=-1+product(1+t*x^j+t^2*x^(2*j)+t^3*x^(3*j),j=1..35): gser:=simplify(series(g,x=0,23)): for n from 1 to 18 do P[n]:=sort(coeff(gser,x^n)) od: for n from 1 to 18 do seq(coeff(P[n],t^j),j=1..floor(sqrt(6*n+6)-3/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 min(3, n/i) do

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

%p end:

%p T:= n-> subsop(1=NULL, [b(n, n)])[]:

%p seq(T(n), n=1..20); # _Alois P. Heinz_, Jan 08 2013

%t max = 18; g = -1+Product[1+t*x^j+t^2*x^(2j)+t^3*x^(3j), {j, 1, max}]; t[n_, k_] := SeriesCoefficient[g, {x, 0, n}, {t, 0, k}]; Table[DeleteCases[Table[t[n, k], {k, 1, n}], 0], {n, 1, max}] // Flatten (* _Jean-François Alcover_, Jan 08 2014 *)

%Y Cf. A001935, A008289, A117148, A209318.

%K nonn,tabf

%O 1,8

%A _Emeric Deutsch_, Mar 07 2006