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!)
A368522 Triangular array T, read by rows: T(n,k) = number of sums |x-y| + |y-z| - |x-z| = 2n-2-k, where x,y,z are in {1,2,...,n}. 12

%I #9 Jan 29 2024 11:01:30

%S 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,

%T 161,2,8,18,32,50,72,98,232,2,8,18,32,50,72,98,128,321,2,8,18,32,50,

%U 72,98,128,162,430,2,8,18,32,50,72,98,128,162,200,561,2

%N Triangular array T, read by rows: T(n,k) = number of sums |x-y| + |y-z| - |x-z| = 2n-2-k, where x,y,z are in {1,2,...,n}.

%C The rows are the reversals of the rows in A368521.

%e First eight rows:

%e 1

%e 2 6

%e 2 8 17

%e 2 8 18 36

%e 2 8 18 32 65

%e 2 8 18 32 50 106

%e 2 8 18 32 50 72 161

%e 2 8 18 32 50 72 98 232

%e For n=2, there are 8 triples (x,y,z):

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

%e 112: |x-y| + |y-z| - |x-z| = 0

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

%e 122: |x-y| + |y-z| - |x-z| = 0

%e 211: |x-y| + |y-z| - |x-z| = 0

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

%e 221: |x-y| + |y-z| - |x-z| = 0

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

%e so row 2 of the array is (2,6), representing two 2s and six 0s.

%t t[n_] := t[n] = Tuples[Range[n], 3]

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

%t - Abs[#[[1]] - #[[3]]] == 2n-2-k &]

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

%t v = Flatten[u] (* sequence *)

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

%Y Cf. A084990 (column 1), A000578 (row sums), A001105 (limiting row), A368521.

%K nonn,tabl

%O 1,2

%A _Clark Kimberling_, Jan 25 2024

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 04:26 EDT 2024. Contains 375059 sequences. (Running on oeis4.)