cp's OEIS Frontend

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.

A368519 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 < z.

This page as a plain text file.
%I A368519 #4 Jan 25 2024 08:07:44
%S A368519 2,4,3,2,6,6,8,2,2,8,9,14,9,6,2,2,10,12,20,16,16,6,6,2,2,12,15,26,23,
%T A368519 26,17,12,6,6,2,2,14,18,32,30,36,28,26,12,12,6,6,2,2,16,21,38,37,46,
%U A368519 39,40,27,20,12,12,6,6,2,2,18,24,44,44,56,50,54,42
%N A368519 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 <  z.
%C A368519 Row n consists of 2n-1 positive integers.
%e A368519 First six rows:
%e A368519    2
%e A368519    4   3    2
%e A368519    6   6    8   2   2
%e A368519    8   9   14   9   6   2   2
%e A368519    10  12  20  16  16   6   6  2  2
%e A368519    12  15  26  23  26  17  12  6  6  2  2
%e A368519 For n=3, there are 9 triples (x,y,z) having x < z:
%e A368519 112:  |x-y| + |y-z| = 1
%e A368519 113:  |x-y| + |y-z| = 2
%e A368519 122:  |x-y| + |y-z| = 1
%e A368519 123:  |x-y| + |y-z| = 2
%e A368519 132:  |x-y| + |y-z| = 3
%e A368519 133:  |x-y| + |y-z| = 2
%e A368519 213:  |x-y| + |y-z| = 3
%e A368519 223:  |x-y| + |y-z| = 1
%e A368519 233:  |x-y| + |y-z| = 1,
%e A368519 so that row 1 of the array is (4,3,2), representing four 1s, three 2s, and two 3s.
%t A368519 t1[n_] := t1[n] = Tuples[Range[n], 3];
%t A368519 t[n_] := t[n] = Select[t1[n], #[[1]] < #[[3]] &];
%t A368519 a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];
%t A368519 u = Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 3}];
%t A368519 v = Flatten[u];  (* sequence *)
%t A368519 Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 3}]]  (* array *)
%Y A368519 Cf. A006002 (row sums), A110660 (limiting reverse row), A368434, A368437, A368515, A368516, A368517, A368518, A368520, A368521, A368522.
%K A368519 nonn,tabf
%O A368519 1,1
%A A368519 _Clark Kimberling_, Jan 22 2024