login

Revision History for A368520

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing all changes.
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.
(history; published version)
#4 by N. J. A. Sloane at Thu Jan 25 08:07:53 EST 2024
STATUS

proposed

approved

#3 by Clark Kimberling at Mon Jan 22 11:22:32 EST 2024
STATUS

editing

proposed

#2 by Clark Kimberling at Mon Jan 22 11:07:40 EST 2024
NAME

allocated for Clark KimberlingIrregular 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.

DATA

1, 2, 2, 2, 3, 4, 7, 2, 2, 4, 6, 12, 8, 6, 2, 2, 5, 8, 17, 14, 15, 6, 6, 2, 2, 6, 10, 22, 20, 24, 16, 12, 6, 6, 2, 2, 7, 12, 27, 26, 33, 26, 25, 12, 12, 6, 6, 2, 2, 8, 14, 32, 32, 42, 36, 38, 26, 20, 12, 12, 6, 6, 2, 2, 9, 16, 37, 38, 51, 46, 51, 40, 37, 20, 20

OFFSET

1,2

COMMENTS

Row n consists of 2n-1 positive integers.

EXAMPLE

First seven rows:

1

2 2 2

3 4 7 2 2

4 6 12 8 6 2 2

5 8 17 14 15 6 6 2 2

6 10 22 20 24 16 12 6 6 2 2

7 12 27 26 33 26 25 12 12 6 6 2 2

For n=2, there are 6 triples (x,y,z) having x <= z:

111: |x-y| + |y-z| = 0

112: |x-y| + |y-z| = 1

121: |x-y| + |y-z| = 2

122: |x-y| + |y-z| = 1

212: |x-y| + |y-z| = 2

222: |x-y| + |y-z| = 0

so that row 1 of the array is (2,2,2), representing two 0s, two 1s, and two 2s.

MATHEMATICA

t1[n_] := t1[n] = Tuples[Range[n], 3];

t[n_] := t[n] = Select[t1[n], #[[1]] <= #[[3]] &];

a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];

u = Table[Length[a[n, k]], {n, 1, 15}, {k, 0, 2 n - 2}];

v = Flatten[u] (* sequence *)

Column[Table[Length[a[n, k]], {n, 1, 15}, {k, 0, 2 n - 2}]] (* array *)

CROSSREFS

Cf. A002411 (row sums), A110660 (limiting reverse row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368521, A368522.

KEYWORD

allocated

nonn,tabf

AUTHOR

Clark Kimberling, Jan 22 2024

STATUS

approved

editing

#1 by Clark Kimberling at Thu Dec 28 19:59:33 EST 2023
NAME

allocated for Clark Kimberling

KEYWORD

allocated

STATUS

approved