cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A378834 Number of ways to reverse a permutation of n elements by the minimum number of steps of rotate left or right 1 place (L,R), or exchange first two elements (E).

Original entry on oeis.org

1, 3, 2, 2, 2, 6, 6, 32, 32, 240, 240, 2304, 2304
Offset: 1

Views

Author

Kevin Ryde, Dec 09 2024

Keywords

Comments

The minimum number of steps is A186752(n).
For n=2, steps L,R,E all have the same effect but each is taken as a separate way so that a(2) = 3.
For 4 <= n <= 13, a(n) = (h+2)*2^h*h! where h = floor((n-4)/2).

Examples

			For n=1, permutation {1} is already its own reversal so has a(1) = 1 way of no steps (A186752(1) = 0).
For n=5, the a(5) = 2 ways to reverse {1,2,3,4,5} by A186752(5) = 8 steps are
  E, L, L, E, L, E, R, E
  E, L, E, R, E, R, R, E
Notice these are inverses: reverse the order and flip L<->R in one makes the other.
		

Crossrefs

Cf. A186752 (number of steps).
Cf. A061545 (ways for LE).