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.

A375222 a(n) is the number of permutations of the multiset 1,1, 2,2, ..., n,n such that exactly one pair k,k stays at its initial locations 2k-1, 2k.

Original entry on oeis.org

1, 0, 15, 296, 10965, 609864, 47880595, 5047886640, 688359502089, 117929734950320, 24798753695076471, 6280419381186155160, 1885582606127524251805, 662239984799385248609976, 268999138538324585872798395, 125133475474486312764311243744, 66091677106419135401506827779985
Offset: 1

Views

Author

Hugo Pfoertner, Aug 05 2024

Keywords

Comments

1

Examples

			a(3) = 15: The permutations with one stable pair are
  [1, 1, 2, 3, 2, 3], [1, 1, 2, 3, 3, 2], [1, 1, 3, 2, 2, 3], [1, 1, 3, 2, 3, 2],
  [1, 1, 3, 3, 2, 2], [1, 2, 1, 2, 3, 3], [1, 2, 2, 1, 3, 3], [1, 3, 2, 2, 1, 3],
  [1, 3, 2, 2, 3, 1], [2, 1, 1, 2, 3, 3], [2, 1, 2, 1, 3, 3], [2, 2, 1, 1, 3, 3],
  [3, 1, 2, 2, 1, 3], [3, 1, 2, 2, 3, 1], [3, 3, 2, 2, 1, 1].
		

Crossrefs

Cf. A000680 (all permutations of this multiset), A375223 (at least one stable pair), A374980.

Programs

  • PARI
    a375222(n) = {my(p=vector(2*n,i,1+(i-1)\2), m1=0); forperm (p, q, my(m=0); for (k=1, n, if (q[2*k-1]==k && q[2*k]==k, m++)); m1+=(m==1)); m1}

Formula

a(n) = n * A374980(n-1). - Alois P. Heinz, Aug 05 2024

Extensions

a(8) onwards from Alois P. Heinz, Aug 05 2024