login
Irregular triangle: row n consists of the frequencies of positive distances between permutations P and reverse(P), as P ranges through the permutations of (1, 2, ..., n); see Comments.
0

%I #17 Jun 05 2023 08:55:48

%S 1,2,4,2,8,16,24,16,32,32,16,48,192,192,288,192,144,576,576,576,576,

%T 960,576,576,288,384,2304,4608,7680,9216,6912,9216,1920,1536,9216,

%U 9216,16128,18432,29184,26112,36864,32256,41472,23040,39168,32256,18432,18432

%N Irregular triangle: row n consists of the frequencies of positive distances between permutations P and reverse(P), as P ranges through the permutations of (1, 2, ..., n); see Comments.

%C For n >= 1, let P = (p(1),p(2),...,p(n)) and Q = (q(1),q(2),...,q(n)) be permutations of (1,2,...,n). The distance between P and Q is defined by |p(1)-q(1)| + |p(2)-q(2)| + ... + |p(n)-q(n)|. For fixed n >= 1, let m be the least distance that occurs and let M be the greatest. If n is odd, let S = (m, m+2, m+4, ..., M); if n > 2 is even, let S = (m, m+4, m+8, ..., M). Then S gives all the positive distances that occur, and the frequencies in row n of the array account for the distances in S. Four open questions about the numbers in row n follow. (1) How many are there? (2) What are the first and last? (3) What are the least and greatest? (4) What is the greatest common divisor?

%e First 8 rows:

%e 1

%e 2

%e 4 2

%e 8 16

%e 24 16 32 32 16

%e 48 192 192 288

%e 192 144 576 576 576 576 960 576 576 288

%e 384 2304 4608 7680 9216 6912 9216

%e For n=3, the 6 permutations and their reverses are represented by

%e 123 132 213 231 212 321

%e 321 231 312 132 213 123,

%e so the 6 distances are 4,2,2,2,2,4, whence row 3 accounts for four 2's and two 4's.

%t p[n_] := p[n] = Permutations[Range[n]];

%t f[n_, k_] := f[n, k] = Abs[p[n][[k]] - Reverse[p[n][[k]]]]

%t c[n_, k_] := c[n, k] = Total[f[n, k]]

%t t[n_] := t[n] = Table[c[n, k], {k, 1, n!}]

%t z = 6; Table[t[n], {n, 1, z}]

%t u = Table[Count[t[n], k], {n, 1, z}, {k, Min[t[n]], Max[t[n]], 2}]

%t v[n_] := Select[u[[n]], # > 0 &]

%t w = Table[v[n], {n, 1, z}]

%t TableForm[w] (* 356257 array *)

%t Flatten[w] (* 356257 sequence *)

%Y Cf. A000142 (row sums), A357329.

%K nonn,tabf,more

%O 1,2

%A _Clark Kimberling_, Oct 04 2022