OFFSET
1,2
COMMENTS
The rows are the reversals of the rows in A368521.
EXAMPLE
First eight rows:
1
2 6
2 8 17
2 8 18 36
2 8 18 32 65
2 8 18 32 50 106
2 8 18 32 50 72 161
2 8 18 32 50 72 98 232
For n=2, there are 8 triples (x,y,z):
111: |x-y| + |y-z| - |x-z| = 0
112: |x-y| + |y-z| - |x-z| = 0
121: |x-y| + |y-z| - |x-z| = 2
122: |x-y| + |y-z| - |x-z| = 0
211: |x-y| + |y-z| - |x-z| = 0
212: |x-y| + |y-z| - |x-z| = 2
221: |x-y| + |y-z| - |x-z| = 0
222: |x-y| + |y-z| - |x-z| = 0
so row 2 of the array is (2,6), representing two 2s and six 0s.
MATHEMATICA
t[n_] := t[n] = Tuples[Range[n], 3]
a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]]
- Abs[#[[1]] - #[[3]]] == 2n-2-k &]
u = Table[Length[a[n, k]], {n, 1, 15}, {k, 0, 2 n - 2, 2}]
v = Flatten[u] (* sequence *)
Column[Table[Length[a[n, k]], {n, 1, 15}, {k, 0, 2 n - 2, 2}]] (* array *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Jan 25 2024
STATUS
approved