login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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).
2
1, 3, 2, 2, 2, 6, 6, 32, 32, 240, 240, 2304, 2304
OFFSET
1,2
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).
EXAMPLE
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).
Sequence in context: A134653 A377320 A090207 * A364571 A202538 A239736
KEYWORD
nonn,more
AUTHOR
Kevin Ryde, Dec 09 2024
STATUS
approved