This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A080511 #14 May 21 2016 03:04:43 %S A080511 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 A080511 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 A080511 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 A080511 Triangle whose n-th row contains the least set (ordered lexicographically) of n distinct positive integers whose arithmetic mean is an integer. %C A080511 The n-th row is {1,2,...,n-1,x}, where x=n if n is odd, x=3n/2 if n is even. %e A080511 Triangle starts: %e A080511 1; %e A080511 1, 3; %e A080511 1, 2, 3; %e A080511 1, 2, 3, 6; %e A080511 1, 2, 3, 4, 5; %e A080511 1, 2, 3, 4, 5, 9; %e A080511 1, 2, 3, 4, 5, 6, 7; %e A080511 1, 2, 3, 4, 5, 6, 7, 12; %e A080511 ... %p A080511 T:= proc(n) $1..n-1, `if`(irem(n, 2)=1, n, 3*n/2) end: %p A080511 seq(T(n), n=1..20); # _Alois P. Heinz_, Aug 29 2013 %t A080511 row[n_] := Append[Range[n - 1], If[OddQ[n], n, 3 n/2]]; %t A080511 Table[row[n], {n, 1, 20}] // Flatten (* _Jean-François Alcover_, May 21 2016 *) %Y A080511 Cf. A080512, A008619, A080504, A080508. %K A080511 nonn,tabl %O A080511 1,3 %A A080511 _Amarnath Murthy_, Mar 20 2003