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.
%I A381531 #24 Feb 26 2025 21:09:01 %S A381531 1,1,2,1,4,5,2,14,34,34,12,132,540,1020,888,288,4608,28800,89280, %T A381531 143712,113472,34560,760320,6773760,31449600,81527040,117089280, %U A381531 85847040,24883200,721612800,8709120000,56783462400,217205452800,495200563200,651939840000,450584985600,125411328000 %N A381531 Number of permutations of [n] having the maximal possible number of pairs of integers i<j in [n] such that their cycle minima have opposite sorting order. %C A381531 The sequence has local minima at positions n in { A000217 }. The values at these positions are superfactorials (A000178). %H A381531 Alois P. Heinz, <a href="/A381531/b381531.txt">Table of n, a(n) for n = 0..406</a> %H A381531 Wikipedia, <a href="https://en.wikipedia.org/wiki/Inversion_(discrete_mathematics)">Inversion</a> %H A381531 Wikipedia, <a href="https://en.wikipedia.org/wiki/Permutation">Permutation</a> %F A381531 a(n) = A381529(n,A125811(n)-1). %F A381531 a(A000217(n)) = A000178(n-1) for n>=1. %e A381531 a(4) = 4: (1,4)(2)(3), (1,4)(2,3), (1,3,4)(2), (1,4,3)(2) with 2 pairs each. %e A381531 a(6) = 2: (1,5,6)(2,4)(3), (1,6,5)(2,4)(3) with 7 pairs each. %p A381531 b:= proc(o, u, t) option remember; (p-> (d-> coeff(p, x, d) %p A381531 *x^d)(degree(p)))(expand(`if`(u+o=0, max(0, t-1)!, %p A381531 `if`(t>0, b(u+o, 0$2)*(t-1)!, 0)+add(x^(u+j-1)* %p A381531 b(o-j, u+j-1, t+1), j=`if`(t=0, 1, 1..o))))) %p A381531 end: %p A381531 a:= n-> coeffs(b(n, 0$2)): %p A381531 seq(a(n), n=0..36); %Y A381531 Cf. A000178, A000217, A125811, A381529. %K A381531 nonn %O A381531 0,3 %A A381531 _Alois P. Heinz_, Feb 26 2025