OFFSET
1,3
COMMENTS
1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..238
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
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Aug 05 2024
EXTENSIONS
a(8) onwards from Alois P. Heinz, Aug 05 2024
STATUS
approved