A381539
Number of permutations of [n] having exactly one pair of integers i
0, 0, 0, 1, 5, 21, 89, 408, 2106, 12529, 86579, 691287, 6296333, 64454418, 731532528, 9101244205, 122993164505, 1792140943473, 27987008885201, 466072881110268, 8241676745580774, 154187446760870761, 3042028843184493887, 63114652818792762987, 1373581948592359961909
Offset: 0
Keywords
Examples
a(4) = 5: (1)(2,4)(3), (1,2,4)(3), (1,4,2)(3), (1,3)(2)(4), (1,3)(2,4).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..300
- Wikipedia, Inversion
- Wikipedia, Permutation
Crossrefs
Column k=1 of A381529.
Programs
-
Maple
b:= proc(o, u, t) option remember; series(`if`(u+o=0, max(0, t-1)!, `if`(t>0, b(u+o, 0$2)*(t-1)!, 0)+add(x^(u+j-1)* b(o-j, u+j-1, t+1), j=`if`(t=0, 1, 1..o))), x, 2) end: a:= n-> coeff(b(n, 0$2), x, 1): seq(a(n), n=0..25);