%I #19 Nov 08 2016 19:49:33
%S 1,1,3,0,0,3,2,2,4,1,1,4,6,0,3,3,0,6,5,2,2,5,7,1,4,4,1,7,9,0,6,3,3,6,
%T 0,9,8,2,5,5,2,8,10,1,7,4,4,7,1,10,12,0,9,3,6,6,3,9,0,12,11,2,8,5,5,8,
%U 2,11,13,1,10,4,7,7,4,10,1,13,15,0,12,3,9,6,6
%N Irregular triangle T(n,k) where row n contains all pairs [a,b] of the compositions n=a+b into nonnegative pairs where a == b (mod 3).
%C Row lengths are 2*A008611(n). Row sums are n*A008611(n).- _R. J. Mathar_, May 13 2016
%e 1, 1;
%e 3, 0, 0, 3;
%e 2, 2;
%e 4, 1, 1, 4;
%e 6, 0, 3, 3, 0, 6;
%e 5, 2, 2, 5;
%e 7, 1, 4, 4, 1, 7;
%e 9, 0, 6, 3, 3, 6, 0, 9;
%e 8, 2, 5, 5, 2, 8;
%e 10, 1, 7, 4, 4, 7, 1, 10;
%e 12, 0, 9, 3, 6, 6, 3, 9, 0, 12;
%e 11, 2, 8, 5, 5, 8, 2, 11;
%e 13, 1, 10, 4, 7, 7, 4, 10, 1, 13;
%e 15, 0, 12, 3, 9, 6, 6, 9, 3, 12, 0, 15;
%e 14, 2, 11, 5, 8, 8, 5, 11, 2, 14;
%p A181634_row := proc(n)
%p local L,a,b;
%p L := [] ;
%p for a from n to 0 by -1 do
%p b := n-a ;
%p if modp(a,3) = modp(b,3) then
%p L := [op(L),a,b] ;
%p end if;
%p end do:
%p L ;
%p end proc:
%p for n from 2 to 18 do
%p print(op(A181634_row(n))) ;
%p end do: # _R. J. Mathar_, May 13 2016
%t If[First@ # == Last@ # &@ Take[#, 2], Join[Reverse@ Drop[#, 2], #], Join[Reverse@ #, #]] & /@ Function[n, Flatten@ Select[Transpose@ {n - #, #}, Mod[First@ #, 3] == Mod[Last@ #, 3] &] &@ Range[Ceiling[n/2], n]] /@ Range[2, 16] // Flatten (* _Michael De Vlieger_, May 13 2016 *)
%K nonn,easy,tabf,less
%O 2,3
%A Florentin Smarandache (smarand(AT)unm.edu), Nov 03 2010
%E Edited by _R. J. Mathar_, May 13 2016