%I #16 Jul 05 2020 12:25:57
%S 0,0,1,1,0,2,1,2,0,3,2,1,3,0,4,2,3,1,4,0,5,3,2,4,1,5,0,6,3,4,2,5,1,6,
%T 0,7,4,3,5,2,6,1,7,0,8,4,5,3,6,2,7,1,8,0,9,5,4,6,3,7,2,8,1,9,0,10,5,6,
%U 4,7,3,8,2,9,1,10,0,11,6,5,7,4,8,3,9,2,10,1,11,0,12
%N Triangle read by rows in which row n >= 0 lists numbers from 0 to n starting at floor(n/2) and using alternatively larger respectively smaller numbers than the values used so far.
%C The idea is to cover the range 0..n starting from the center and approaching the limiting values in the most symmetric way, using the smaller value in case of a tie, which leads to each row ending in (the first occurrence of) n.
%C Contains any sequence of nonnegative integers as a subsequence.
%F If columns are indexed starting from 0:
%F T(n,0) = floor(n/2) = A004526(n).
%F T(n,n-2*k) = n-k, for k >= 0.
%F T(n,n-2*k-1) = k, for k >= 0.
%F T(n,k) = floor((n+(-1)^(n-k)*k)/2) = (n+k)/2 if n+k even, otherwise floor((n-k)/2).
%F a(n) = |A128180(n)| - 1.
%e The table starts:
%e Row 0: 0;
%e Row 1: 0, 1;
%e Row 2: 1, 0, 2;
%e Row 3: 1, 2, 0, 3;
%e Row 4: 2, 1, 3, 0, 4;
%e Row 5: 2, 3, 1, 4, 0, 5;
%e Row 5: 3, 2, 4, 1, 5, 0, 6;
%e Row 6: 3, 4, 2, 5, 1, 6, 0, 7;
%e Row 7: 4, 3, 5, 2, 6, 1, 7, 0, 8;
%e Row 8: 4, 5, 3, 6, 2, 7, 1, 8, 0, 9;
%e Row 9: 5, 4, 6, 3, 7, 2, 8, 1, 9, 0, 10;
%e Row 10: 5, 6, 4, 7, 3, 8, 2, 9, 1, 10, 0, 11; ...
%e Column 1 is floor(n/2) = A004526(n).
%e The "diagonal" (last element of each row) are the nonnegative integers A001477.
%e The first subdiagonal is the zero sequence A000004.
%e The second subdiagonal is the set of positive integers A000027.
%e The third subdiagonal is "all ones" sequence A000012.
%e And so on: in alternance, every other subdiagonal is the set of integers >= k, resp., k times the all ones sequence.
%t Table[Floor[(n + (-1)^(n - k)*k)/2], {n, 0, 12}, {k, 0, n}] // Flatten (* _Michael De Vlieger_, Jul 03 2020 *)
%o (PARI) row(n)={ my(m=n\2, M=m, r=[m]); while(#r <= n, r=concat(r, if( n-M > m, M+=1, m-=1))); r}
%o (PARI) T(n,k)=(n+(-1)^(n-k)*k)\2
%Y Cf. A196199 (concatenate [-n .. n] for n=0, 1, 2...).
%Y Cf. |A128180| = A209279 (based on a very similar idea with positive integers instead).
%K nonn,tabl
%O 0,6
%A _M. F. Hasler_, May 30 2020