# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a368606 Showing 1-1 of 1 %I A368606 #10 Jan 29 2024 11:01:39 %S A368606 1,2,2,1,3,4,4,2,1,4,6,7,6,4,2,1,5,8,10,10,9,6,4,2,1,6,10,13,14,14,12, %T A368606 9,6,4,2,1,7,12,16,18,19,18,16,12,9,6,4,2,1,8,14,19,22,24,24,23,20,16, %U A368606 12,9,6,4,2,1,9,16,22,26,29,30,30,28,25,20,16 %N A368606 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 A368606 Row n consists of 2n-1 positive integers. %e A368606 First six rows: %e A368606 1 %e A368606 2 2 1 %e A368606 3 4 4 2 1 %e A368606 4 6 7 6 4 2 1 %e A368606 5 8 10 10 9 6 4 2 1 %e A368606 6 10 13 14 14 12 9 6 4 2 1 %e A368606 For n=2, there are 5 triples (x,y,z) having x <= y and y >= z: %e A368606 111: |x-y| + |y-z| = 0 %e A368606 121: |x-y| + |y-z| = 2 %e A368606 122: |x-y| + |y-z| = 1 %e A368606 221: |x-y| + |y-z| = 1 %e A368606 222: |x-y| + |y-z| = 0 %e A368606 so row 2 of the array is (2,2,1), representing two 0s, two 1s, and one 3. %t A368606 t1[n_] := t1[n] = Tuples[Range[n], 3]; %t A368606 t[n_] := t[n] = Select[t1[n], #[[1]] <= #[[2]] >= #[[3]] &]; %t A368606 a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &]; %t A368606 u = Table[Length[a[n, k]], {n, 1, 15}, {k, 0, 2 n - 2}]; %t A368606 v = Flatten[u] (* sequence *) %t A368606 Column[Table[Length[a[n, k]], {n, 1, 15}, {k, 0, 2 n - 2}]] (* array *) %Y A368606 Cf. A000027 (column 1), A000330 (row sums), A002620 (limiting reversed row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368520, A368521, A368522, A368604, A368605, A368607, A368609. %K A368606 nonn,tabf %O A368606 1,2 %A A368606 _Clark Kimberling_, Jan 22 2024 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE