%I #18 Nov 07 2014 05:23:54
%S 1,1,2,3,1,6,2,11,5,21,10,1,39,22,3,73,46,9,136,97,22,1,254,200,54,4,
%T 474,410,126,14,885,832,290,40,1,1652,1679,651,109,5,3084,3368,1440,
%U 280,20,5757,6725,3138,698,65,1,10747,13370,6762,1688,195,6,20062,26483,14424,3994,546,27
%N Triangular array read by rows: T(n,k) is the number of compositions of n that have exactly k 3's; n>=0, 0<=k<=floor(n/3).
%C Row Sums = 2^(n-1) for n>0.
%H Alois P. Heinz, <a href="/A218796/b218796.txt">Rows n = 0..250, flattened</a>
%H Philippe Flajolet and Robert Sedgewick, <a href="http://algo.inria.fr/flajolet/Publications/AnaCombi/anacombi.html">Analytic Combinatorics</a>, Cambridge Univ. Press, 2009, page 168.
%F O.g.f.: 1/(1-(x/(1-x)-x^3+y*x^3)) and generally for the number of compositions with k parts of size r we have: 1/(1-(x/(1-x)-x^r+y*x^r)).
%e 1;
%e 1;
%e 2;
%e 3, 1;
%e 6, 2;
%e 11, 5;
%e 21, 10, 1;
%e 39, 22, 3;
%e 73, 46, 9;
%e 136, 97, 22, 1;
%e 254, 200, 54, 4;
%e 474, 410, 126, 14;
%e 885, 832, 290, 40, 1;
%e 1652, 1679, 651, 109, 5;
%e 3084, 3368, 1440, 280, 20;
%e 5757, 6725, 3138, 698, 65, 1;
%p T:= proc(n) option remember; local j; if n=0 then 1
%p else []; for j to n do zip((x, y)-> x+y, %,
%p [`if`(j=3, 0, [][]), T(n-j)], 0) od; %[] fi
%p end:
%p seq (T(n), n=0..25); # _Alois P. Heinz_, Nov 05 2012
%t nn=15;f[list_]:=Select[list,#>0&];Map[f,CoefficientList[Series[1/(1-(x/(1-x)-x^3+y x^3)),{x,0,nn}],{x,y}]]//Grid
%Y Cf. A105114, A045623, A011782.
%Y Column k=0 gives: A049856(n+2).
%K nonn,tabf
%O 0,3
%A _Geoffrey Critzer_, Nov 05 2012