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 A368608 #9 Jan 29 2024 11:01:49 %S A368608 2,1,4,5,2,1,6,9,8,4,2,1,8,13,14,12,6,4,2,1,10,17,20,20,16,9,6,4,2,1, %T A368608 12,21,26,28,26,21,12,9,6,4,2,1,14,25,32,36,36,33,26,16,12,9,6,4,2,1, %U A368608 16,29,38,44,46,45,40,32,20,16,12,9,6,4,2,1,18,33 %N A368608 Irregular triangular array T, read by rows: T(n,k) = number of sums |x-y| + |y-z| = k, where x,y,z are in {1,2,...,n} and x != y and y <= z. %C A368608 Row n consists of 2n positive integers. %e A368608 First six rows: %e A368608 2 1 %e A368608 4 5 2 1 %e A368608 6 9 8 4 2 1 %e A368608 8 13 14 12 6 4 2 1 %e A368608 10 17 20 20 16 9 6 4 2 1 %e A368608 12 21 26 28 26 21 12 9 6 4 2 1 %e A368608 For n=2, there are 3 triples (x,y,z) having x != y and y <= z: %e A368608 122: |x-y| + |y-z| = 1 %e A368608 211: |x-y| + |y-z| = 1 %e A368608 212: |x-y| + |y-z| = 2 %e A368608 so row 2 of the array is (2,1), representing two 1s and one 2. %t A368608 t1[n_] := t1[n] = Tuples[Range[n], 3]; %t A368608 t[n_] := t[n] = Select[t1[n], #[[1]] != #[[2]] <= #[[3]] &]; %t A368608 a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &]; %t A368608 u = Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}]; %t A368608 v = Flatten[u] (* sequence *) %t A368608 Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}]] (* array *) %Y A368608 Cf. A005443 (column 1), A027480 (row sums), A002620 (limiting reversed row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368520, A368521, A368522, A368604, A368605, A368606, A368607, A368609. %K A368608 nonn,tabf %O A368608 1,1 %A A368608 _Clark Kimberling_, Jan 25 2024