TITLE: The diameter of the symmetric group generated by the transposition $(1,2)$ and both left and right rotations by $(1,2,\ldots,n)$
QUESTION [5 upvotes]: I am trying to understand the following sequence:
A186783 -The diameter of the symmetric group generated by the transposition $(1,2)$ and both left and right rotations by $(1,2,\ldots,n)$. The sequence is $0,1,2,6,10,15,21,28,35,45,55,66,\ldots$ If we swap out the $2$ with a $3$ we would have the "triangular numbers", ${n+1 \choose 2}$. With that exception what would make us believe this sequence is not the "triangular numbers".

REPLY [2 votes]: Your conjecture matches the one in the Online Encyclopedia of Integer Sequences
Wesolowski's comment in the OEIS page conjectures a formula involving Stirling numbers of the first kind.  The formula is expressed as a negated sum, but in fact only the first term of this sum is non-zero, except for the exceptional case $n=3$ when the second term makes an adjustment by one.  And the first term, S(n,n-1), is exactly a (negative) triangular number.  So Wesolowski's conjecture and yours are the same.
Small cases
The cases up to $n=3$ can be considered to be special cases.  For $n=1$ the swap generator is ill-defined.  For $n=2$, the three generators are all the same.  For $n=3$, there are two maximally distant permutations, (1 3 2) and (3 2 1), at distance 2 instead of 3.
The general case
But for $n \ge 4$, the pattern falls into place.  There is always (verified up to $n=12$) a unique maximally distant permutation, and it is of the form (2$\;$1 $\,n$ $\;(n-1)\;$ $\ldots\,$ 5 4 3).  In other words, it is the reversed sequence, rotated right twice.  If you imagine a device that lets you rotate beads, and swap two at a certain location, then the maximally distant configuration is just the mirror image of the device's current configuration, with the mirror centered at the center of the swapping location.
       * --- *       Imagine colored beads at the stars, which can be
      /       \      rotated around the ring either way.  At any time,
     /         \     the two at the top can be swapped with each other.
    *           *    
     \         /     Then the configuration needing the most moves to
      \       /      get to is the mirror image (the left-right flip)
       * --- *       of the current configuration.

  This figure shows n=6, but the claim appears to be true for any n≥4.

  The number of required moves is the triangular number C(n,2).

It seems you can get to the flipped configuration optimally by flipping each half of the puzzle separately, using a two-way bubble sort.
However, it remains an open problem both to show that the mirror image is the hardest configuration to reach for all $n \ge 4$, and to show that the mirror image cannot be reached in fewer than $\binom{n}{2}$ moves.