login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
4
1, 0, 15, 296, 10965, 609864, 47880595, 5047886640, 688359502089, 117929734950320, 24798753695076471, 6280419381186155160, 1885582606127524251805, 662239984799385248609976, 268999138538324585872798395, 125133475474486312764311243744, 66091677106419135401506827779985
OFFSET
1,3
COMMENTS
1
LINKS
FORMULA
a(n) = n * A374980(n-1). - Alois P. Heinz, Aug 05 2024
EXAMPLE
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].
PROG
(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}
CROSSREFS
Cf. A000680 (all permutations of this multiset), A375223 (at least one stable pair), A374980.
Sequence in context: A201029 A201341 A144349 * A009064 A049381 A051691
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Aug 05 2024
EXTENSIONS
a(8) onwards from Alois P. Heinz, Aug 05 2024
STATUS
approved