%I
%S 1,1,3,1,2,3,1,2,3,6,1,2,3,4,5,1,2,3,4,5,9,1,2,3,4,5,6,7,1,2,3,4,5,6,
%T 7,12,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,15,1,2,3,4,5,6,7,8,9,10,11,
%U 1,2,3,4,5,6,7,8,9,10,11,18,1,2,3,4,5,6,7,8,9,10,11,12,13,1,2,3,4,5,6,7,8,9,10,11,12,13,21
%N Triangle whose nth row contains the least set (ordered lexicographically) of n distinct positive integers whose arithmetic mean is an integer.
%C The nth row is {1,2,...,n1,x}, where x=n if n is odd, x=3n/2 if n is even.
%e Triangle starts:
%e 1;
%e 1, 3;
%e 1, 2, 3;
%e 1, 2, 3, 6;
%e 1, 2, 3, 4, 5;
%e 1, 2, 3, 4, 5, 9;
%e 1, 2, 3, 4, 5, 6, 7;
%e 1, 2, 3, 4, 5, 6, 7, 12;
%e ...
%p T:= proc(n) $1..n1, `if`(irem(n, 2)=1, n, 3*n/2) end:
%p seq(T(n), n=1..20); # _Alois P. Heinz_, Aug 29 2013
%t row[n_] := Append[Range[n  1], If[OddQ[n], n, 3 n/2]];
%t Table[row[n], {n, 1, 20}] // Flatten (* _JeanFrançois Alcover_, May 21 2016 *)
%Y Cf. A080512, A008619, A080504, A080508.
%K nonn,tabl
%O 1,3
%A _Amarnath Murthy_, Mar 20 2003
