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 A332104 #16 Jul 05 2020 12:25:57 %S A332104 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 A332104 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 A332104 4,7,3,8,2,9,1,10,0,11,6,5,7,4,8,3,9,2,10,1,11,0,12 %N A332104 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 A332104 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 A332104 Contains any sequence of nonnegative integers as a subsequence. %F A332104 If columns are indexed starting from 0: %F A332104 T(n,0) = floor(n/2) = A004526(n). %F A332104 T(n,n-2*k) = n-k, for k >= 0. %F A332104 T(n,n-2*k-1) = k, for k >= 0. %F A332104 T(n,k) = floor((n+(-1)^(n-k)*k)/2) = (n+k)/2 if n+k even, otherwise floor((n-k)/2). %F A332104 a(n) = |A128180(n)| - 1. %e A332104 The table starts: %e A332104 Row 0: 0; %e A332104 Row 1: 0, 1; %e A332104 Row 2: 1, 0, 2; %e A332104 Row 3: 1, 2, 0, 3; %e A332104 Row 4: 2, 1, 3, 0, 4; %e A332104 Row 5: 2, 3, 1, 4, 0, 5; %e A332104 Row 5: 3, 2, 4, 1, 5, 0, 6; %e A332104 Row 6: 3, 4, 2, 5, 1, 6, 0, 7; %e A332104 Row 7: 4, 3, 5, 2, 6, 1, 7, 0, 8; %e A332104 Row 8: 4, 5, 3, 6, 2, 7, 1, 8, 0, 9; %e A332104 Row 9: 5, 4, 6, 3, 7, 2, 8, 1, 9, 0, 10; %e A332104 Row 10: 5, 6, 4, 7, 3, 8, 2, 9, 1, 10, 0, 11; ... %e A332104 Column 1 is floor(n/2) = A004526(n). %e A332104 The "diagonal" (last element of each row) are the nonnegative integers A001477. %e A332104 The first subdiagonal is the zero sequence A000004. %e A332104 The second subdiagonal is the set of positive integers A000027. %e A332104 The third subdiagonal is "all ones" sequence A000012. %e A332104 And so on: in alternance, every other subdiagonal is the set of integers >= k, resp., k times the all ones sequence. %t A332104 Table[Floor[(n + (-1)^(n - k)*k)/2], {n, 0, 12}, {k, 0, n}] // Flatten (* _Michael De Vlieger_, Jul 03 2020 *) %o A332104 (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 A332104 (PARI) T(n,k)=(n+(-1)^(n-k)*k)\2 %Y A332104 Cf. A196199 (concatenate [-n .. n] for n=0, 1, 2...). %Y A332104 Cf. |A128180| = A209279 (based on a very similar idea with positive integers instead). %K A332104 nonn,tabl %O A332104 0,6 %A A332104 _M. F. Hasler_, May 30 2020