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.

Showing 1-3 of 3 results.

A260506 Number of signed permutations of length n that are sortable to the identity permutation by some sequence of cdr (context-directed reversal) and cds (context-directed swap) moves.

Original entry on oeis.org

1, 3, 18, 140, 1384, 16428, 228248
Offset: 1

Views

Author

Caleb Stanford, Jul 27 2015

Keywords

Comments

a(n) is equivalently the number of signed permutations such that in the reality-desire graph of the permutation, 0 and n are in different cycles.
It is also the number of signed permutations such that the overlap of that permutation contains a partition into two vertex sets, V_1 and V_2, such that (i) vertices (0,1) and (n,n+1) are in different cycles, and (ii) every vertex in V_1 is adjacent to an even number of vertices in V_2, and every vertex in V_2 is adjacent to an even number of vertices in V_1.
It is expected (but not proven) asymptotically that a(n) is about one-third of all permutations, i.e., it is about (2^n * n!) / 3.

Examples

			a(2) = 3 because out of the 8 signed permutations of size 2, only [1,2], [1,-2], and [-1,2] are sortable. They each take one cdr move. Three other permutations, [-2,-1], [2,-1], and [-2,1] are not sortable to the identity [1,2] but instead sort to [-2,-1]. Finally, [2,1] and [-1,-2] sort to neither [1,2] nor [-2,-1].
		

Crossrefs

A249165 counts the special case of this property for unsigned permutations. Note that for unsigned permutations, there are no valid cdr moves, so sortability by cdr and cds is equivalent to sortability by cds only.
A000165 counts the total number of signed permutations.

A260695 a(n) is the number of permutations p of {1,..,n} such that the minimum number of block interchanges required to sort the permutation p to the identity permutation is maximized.

Original entry on oeis.org

1, 1, 1, 5, 8, 84, 180, 3044, 8064, 193248, 604800, 19056960, 68428800, 2699672832, 10897286400, 520105017600, 2324754432000, 130859579289600, 640237370572800, 41680704936960000, 221172909834240000, 16397141420298240000, 93666727314800640000, 7809290721329061888000, 47726800133326110720000
Offset: 0

Views

Author

Marion Scheepers, Nov 16 2015

Keywords

Comments

Interweaving of nonzero Hultman numbers A164652(n,k) for k=1 and k=2. - Max Alekseyev, Nov 20 2020

Examples

			The next three lines illustrate applying block interchanges to [2 4 6 1 3 5 7], an element of S_7.
Step 1: [2 4 6 1 3 5 7]->[3 5 1 2 4 6 7]-interchange blocks 3 5 and 2 4 6.
Step 2: [3 5 1 2 4 6 7]->[4 1 2 3 5 6 7]-interchange blocks 3 5 and 4.
Step 3: [4 1 2 3 5 6 7]->[1 2 3 4 5 6 7]-interchange blocks 4 and 1 2 3.
As [2 4 6 1 3 5 7] requires 3 = floor(7/2) block interchanges, it is one of the a(7) = 3044.
Each of the 23 non-identity elements of S_4 requires at least 1 block interchange to sort to the identity. But only 8 of these require 2 block interchanges, the maximum number required for elements of S_4. They are: [4 3 2 1], [4 1 3 2], [4 2 1 3], [3 1 4 2], [3 2 4 1], [2 4 1 3], [2 1 4 3], [2 4 3 1]. So, a(4) = 8.
		

Crossrefs

The number of elements of S_n that can be sorted by: a single block interchange (A145126), two block interchanges (A228401), three block interchanges (A256181), context directed block interchanges (A249165).
The number of signed permutations that can be sorted by: context directed reversals (A260511), applying either context directed reversals or context directed block interchanges (A260506).

Programs

  • Mathematica
    a[n_]:=Abs[StirlingS1[n+2,Mod[n,2]+1]/Binomial[n+2,2]]; Array[a,25,0] (* Stefano Spezia, Apr 01 2024 *)
  • PARI
    { A260695(n) = abs(stirling(n+2, n%2+1)) / binomial(n+2, 2); } \\ Max Alekseyev, Nov 20 2020

Formula

For even n, a(n) = 2 * n! / (n+2).
For odd n, a(n) = 2 * n! * H(n+1) / (n+2) = 2 * A000254(n+1) / ((n+1)*(n+2)), where H(n+1) = A001008(n+1)/A002805(n+1) is the (n+1)-st harmonic number.
a(n) = A164652(n, 1+(n mod 2)). - Max Alekseyev, Nov 20 2020

Extensions

Edited and extended by Max Alekseyev incorporating comments from M. Tikhomirov, Nov 20 2020

A260511 Number of signed permutations of length n that are sortable to the identity permutation by some sequence of cdr (context-directed reversal) moves.

Original entry on oeis.org

1, 3, 15, 120, 1227, 15188
Offset: 1

Views

Author

Caleb Stanford, Jul 27 2015

Keywords

Examples

			a(2) = 3 because [1,2], [-1,2], and [1,-2] are sortable to the identity [1,2] using only context-directed reversal moves.
		

Crossrefs

A249165 gives the number of unsigned permutations sortable by context-directed swaps; this is the analog for signed permutations and context-directed reversals.
A260506 gives the number of signed permutations sortable by both cdr and cds moves together. This sequence is therefore always bounded by A260506.
A000165 counts the total number of signed permutations.
Showing 1-3 of 3 results.