login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A368517 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. 11
1, 1, 2, 4, 2, 1, 3, 7, 7, 4, 2, 1, 4, 10, 12, 11, 6, 4, 2, 1, 5, 13, 17, 18, 15, 9, 6, 4, 2, 1, 6, 16, 22, 25, 24, 20, 12, 9, 6, 4, 2, 1, 7, 19, 27, 32, 33, 31, 25, 16, 12, 9, 6, 4, 2, 1, 8, 22, 32, 39, 42, 42, 38, 31, 20, 16, 12, 9, 6, 4, 2, 1, 9, 25, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Row n consists of 2n positive integers.
LINKS
EXAMPLE
First eight rows:
1 1
2 4 2 1
3 7 7 4 2 1
4 10 12 11 6 4 2 1
5 13 17 18 15 9 6 4 2 1
6 16 22 25 24 20 12 9 6 4 2 1
7 19 27 32 33 31 25 16 12 9 6 4 2 1
8 22 32 39 42 42 38 31 20 16 12 9 6 4 2 1
For n=3, there are 9 triples (x,y,z) having x < y:
121: |x-y| + |y-z| = 2
122: |x-y| + |y-z| = 1
123: |x-y| + |y-z| = 2
131: |x-y| + |y-z| = 4
132: |x-y| + |y-z| = 3
133: |x-y| + |y-z| = 2
231: |x-y| + |y-z| = 3
232: |x-y| + |y-z| = 2
233: |x-y| + |y-z| = 1,
so that row 2 of the array is (2,4,2,1), representing two 1s, four 2s, two 3s, and one 4.
MATHEMATICA
t1[n_] := t1[n] = Tuples[Range[n], 3];
t[n_] := t[n] = Select[t1[n], #[[1]] < #[[2]] &];
a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];
u = Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}];
v = Flatten[u] (* sequence *)
Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}]] (* array *)
CROSSREFS
Cf. A006002 (row sums), A002620 (limiting reverse row), A368434, A368437, A368515, A368516, A368518, A368519, A368520, A368521, A368522.
Sequence in context: A356474 A079045 A021417 * A355346 A364608 A105791
KEYWORD
nonn,tabf
AUTHOR
Clark Kimberling, Dec 31 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 11 01:05 EDT 2024. Contains 375059 sequences. (Running on oeis4.)