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.

A048200 Minimal length pair-exchange / set-rotate sequence to reverse n distinct ordered elements.

Original entry on oeis.org

0, 1, 2, 4, 10, 15, 23, 32, 42, 55, 67, 84, 98, 119
Offset: 1

Views

Author

Keywords

Comments

"Rotate" is always a left-rotate (moves leftmost element to the right end) and "Exchange" is always a pair-exchange of the two leftmost elements.
a(15)<=135 and a(16)<=160. See example solutions in the links section. - Dmitry Kamenetsky, Jun 19 2025

Examples

			a(4) = 4 since "xrrx" is the shortest sequence reversing "ABCD". Explicitly, (begin) ABCD, (x)-> BACD, (r)-> ACDB, (r) -> CDBA, (x)-> DCBA.
		

Crossrefs

Programs

  • C
    /* See links. */
  • Java
    /* See links. */
    

Formula

Conjecture: a(n) = (3*n^2/4)-2*n if n is even and a(n) = (3*n^2-10*n+15)/4 if n is odd. See links for more information. - Sai Satwik Kuppili and Bhadrachalam Chitturi, Jun 09 2020

Extensions

a(11) added by Sai Satwik Kuppili and Srinath T, Bhadrachalam Chitturi, Jan 02 2019
a(12) from Sean A. Irvine, Jun 04 2021
a(13) from Kevin Ryde, Dec 19 2024
a(14) from Zachary DeStefano, Jan 03 2025