OFFSET
1,1
COMMENTS
Row n consists of 2n-1 even positive integers.
EXAMPLE
First six rows:
2
6 4 2
10 12 8 4 2
14 20 20 12 8 4 2
18 28 32 28 18 12 8 4 2
22 36 44 44 38 24 18 12 8 4 2
For n=3, there are 12 triples (x,y,z) having x != y and y != z:
121: |x-y| + |y-z| = 2
123: |x-y| + |y-z| = 2
131: |x-y| + |y-z| = 4
132: |x-y| + |y-z| = 3
212: |x-y| + |y-z| = 2
213: |x-y| + |y-z| = 3
231: |x-y| + |y-z| = 3
232: |x-y| + |y-z| = 2
312: |x-y| + |y-z| = 3
313: |x-y| + |y-z| = 4
321: |x-y| + |y-z| = 2
323: |x-y| + |y-z| = 2,
so that row 2 of the array is (6,4,2), representing six 2s, four 3s, and two 4s.
MATHEMATICA
t1[n_] := t1[n] = Tuples[Range[n], 3];
t[n_] := t[n] = Select[t1[n], #[[1]] != #[[2]] && #[[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
KEYWORD
nonn,tabf
AUTHOR
Clark Kimberling, Dec 31 2023
STATUS
approved