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 A368436 #10 Dec 30 2023 23:42:00 %S A368436 2,4,4,12,4,4,6,20,14,12,4,4,8,28,24,28,12,12,4,4,10,36,34,44,30,24, %T A368436 12,12,4,4,12,44,44,60,48,48,24,24,12,12,4,4,14,52,54,76,66,72,50,40, %U A368436 24,24,12,12,4,4,16,60,64,92,84,96,76,72,40,40,24,24,12 %N A368436 Irregular triangular array T, read by rows: T(n,k) = number of sums |x-y|+|y-z| = k, where (x,y,z) is a permutation of three distinct numbers x,y,z taken from {0,1,...,n}, for n >= 2, k >= 2. %C A368436 Row n consists of 2n even positive integers having sum A007531(n+2) = (n+2)!/(n-1)!. %e A368436 Taking n = 2, the permutations of {x,y,z} of {0,1,2} with sums |x-y| + |y-z| = k, for k = 2,3, are as follows: %e A368436 012: |0-1| + |1-2| = 2 %e A368436 021: |0-2| + |2-1| = 3 %e A368436 102: |1-0| + |0-2| = 3 %e A368436 120: |1-2| + |2-0| = 3 %e A368436 201: |2-0| + |0-1| = 3 %e A368436 210: |2-1| + |1-0| = 2 %e A368436 so that row 1 of the array is (2,4), representing two 2s and four 3s. %e A368436 First eight rows: %e A368436 2 4 %e A368436 4 12 4 4 %e A368436 6 20 14 12 4 4 %e A368436 8 28 24 28 12 12 4 4 %e A368436 10 36 34 44 30 24 12 12 4 4 %e A368436 12 44 44 60 48 48 24 24 12 12 4 4 %e A368436 14 52 54 76 66 72 50 40 24 24 12 12 4 4 %e A368436 16 60 64 92 84 96 76 72 40 40 24 24 12 12 4 4 %t A368436 t[n_] := t[n] = Permutations[-1 + Range[n + 1], {3}]; %t A368436 a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &]; %t A368436 u = Table[Length[a[n, k]], {n, 2, 15}, {k, 2, 2 n - 1}]; %t A368436 v = Flatten[u] (* sequence *) %t A368436 Column[u] (* array *) %Y A368436 Cf. A007531, A368434, A368437 (reversed rows). %K A368436 nonn,tabf %O A368436 1,1 %A A368436 _Clark Kimberling_, Dec 25 2023