Sorting by prefix reversal (or "flipping pancakes"). You can only reverse segments that include the initial term of the current permutation; a(n) is the number of reversals that are needed to transform an arbitrary permutation of n letters to the identity permutation.

A058986

Sorting by prefix reversal (or "flipping pancakes"). You can only reverse segments that include the initial term of the current permutation; a(n) is the number of reversals that are needed to transform an arbitrary permutation of n letters to the identity permutation.

Terms

    a(0) =0a(1) =1a(2) =3a(3) =4a(4) =5a(5) =7a(6) =8a(7) =9a(8) =10a(9) =11a(10) =13a(11) =14a(12) =15a(13) =16a(14) =17a(15) =18a(16) =19a(17) =20a(18) =22

External references