%I #14 Nov 24 2013 14:18:44
%S 1,0,1,1,0,1,2,1,2,1,3,3,1,3,8,3,6,9,7,1,7,20,10,2,14,27,25,5,18,52,
%T 39,14,1,30,77,78,26,3,45,132,133,60,8,66,213,240,117,24,1,107,334,
%U 421,232,54,4,157,562,716,450,127,12,245,872,1265,842,279,38,1
%N Triangular array read by rows: T(n,k) is the number of compositions of n with no two consecutive identical parts that have exactly k parts = 1, n>=0, 0<=k<=ceiling(n/3).
%H Alois P. Heinz, <a href="/A232396/b232396.txt">Rows n = 0..250, flattened</a>
%F G.f.: 1/( 1 - y*x/(1 + y*x) - Sum_{j>=2} x^j/(1 + x^j) ).
%e 1;
%e 0, 1;
%e 1, 0;
%e 1, 2;
%e 1, 2, 1;
%e 3, 3, 1;
%e 3, 8, 3;
%e 6, 9, 7, 1;
%e 7, 20, 10, 2;
%e 14, 27, 25, 5;
%e 18, 52, 39, 14, 1;
%e T(7,2) = 7 because we have: 1+2+1+3, 1+2+3+1, 1+3+1+2, 1+3+2+1, 1+5+1, 2+1+3+1, 3+1+2+1.
%p b:= proc(n, t) option remember; `if`(n=0, 1, expand(
%p add(`if`(j=t, 0, b(n-j, j)*`if`(j=1, x, 1)), j=1..n)))
%p end:
%p T:= n-> seq(coeff(b(n, 0), x, i), i=0..ceil(n/3)):
%p seq(T(n), n=0..20); # _Alois P. Heinz_, Nov 24 2013
%t nn=10;CoefficientList[Series[1/(1- u z/(1+ u z) - Sum[z^j/(1+z^j),{j,2,nn}]),{z,0,nn}],{z,u}]//Grid
%Y Row sums give: A003242.
%K nonn,tabf
%O 0,7
%A _Geoffrey Critzer_, Nov 23 2013