|
|
A368607
|
|
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.
|
|
4
|
|
|
1, 3, 2, 1, 5, 6, 4, 2, 1, 7, 10, 10, 6, 4, 2, 1, 9, 14, 16, 14, 9, 6, 4, 2, 1, 11, 18, 22, 22, 19, 12, 9, 6, 4, 2, 1, 13, 22, 28, 30, 29, 24, 16, 12, 9, 6, 4, 2, 1, 15, 26, 34, 38, 39, 36, 30, 20, 16, 12, 9, 6, 4, 2, 1, 17, 30, 40, 46, 49, 48, 44, 36, 25
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Row n consists of 2n-1 positive integers.
|
|
LINKS
|
|
|
EXAMPLE
|
First six rows:
1
3 2 1
5 6 4 2 1
7 10 10 6 4 2 1
9 14 16 14 9 6 4 2 1
11 18 22 22 19 12 9 6 4 2 1
For n=3, there are 6 triples (x,y,z) having x != y and y < z:
123: |x-y| + |y-z| = 2
212: |x-y| + |y-z| = 2
213: |x-y| + |y-z| = 3
312: |x-y| + |y-z| = 3
313: |x-y| + |y-z| = 4
323: |x-y| + |y-z| = 2
so row 2 of the array is (3,2,1), representing three 2s, two 3s, and one 4.
|
|
MATHEMATICA
|
t1[n_] := t1[n] = Tuples[Range[n], 3];
t[n_] := t[n] = Select[t1[n], #[[1]] != #[[2]] < #[[3]] &];
a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];
u = Table[Length[a[n, k]], {n, 2, 15}, {k, 2, 2 n - 2}];
v = Flatten[u] (* sequence *)
Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 2, 2 n - 2}]] (* array *)
|
|
CROSSREFS
|
Cf. A005408 (column 1), A002411 (row sums), A002620 (limiting reversed row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368520, A368521, A368522, A368604, A368605, A368606, A368609.
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|