Unique set of difference between nearest numbers in permutations

54 Views Asked by At

If we take the permutations of $n$ elements, e.g. for $n=3$:

$$123,132,213,231,312,321$$

and consider for each one the sequence of absolute differences $|\pi_{i+1} - \pi_i|$:

$$11,21,12,12,21,11$$

and group by the largest absolute difference $k$:

$$\{11\times 2\}, \{12\times 2, 21\times 2\}$$

we find that the size of each group (here $2, 4$) has no simple recurrence:

$$\begin{eqnarray}T(n,1)&=&2 & \textrm{for }n>1\\ T(n,k)&=&0 & \textrm{for }n\leqslant k\\ T(n,k)&=&2(n-1)! & \textrm{for }n=k+1, n>1\\ \end{eqnarray}$$

This is OEIS A064482.

If we instead ask about the distinct sequences in each group (for $n=3$ that's $1, 2$) we get:

$$\{1\}\\ \{11\}, \{12,21\}\\ \{111\}, \{121,212\},\{321, 311, 131, 232, 123, 113\}\\ \cdots$$

or looking just at how many there are:

$$\begin{eqnarray} 1\; \\ 1\;&2\;\\ 1\;&2\;&6\;\\ 1\;&7\;&24\;&22\;\\ 1\;&8\;&36\;&110\;&112\;\\ 1\;&20\;&140\;&457\;&900\;&648\\ 1\;&25\;&328\;&990\;&4018\;&5834\;&4592 \end{eqnarray}$$

The table is not in OEIS, and nor is the second column or the diagonal. What can be said about it?