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 A214086 #50 Dec 04 2023 12:32:32 %S A214086 1,0,0,1,1,2,10,17,39,119,254,613,1623,3791,9281,23469,56823,140035, %T A214086 349167,857868,2122297,5274213,13044870,32357838,80421284,199613489, %U A214086 496144310,1234420850,3070773600,7644879181,19044266176,47450853932,118290412077,295019269801 %N A214086 Number of involutions of length n having exactly n inversions. %H A214086 Alois P. Heinz, <a href="/A214086/b214086.txt">Table of n, a(n) for n = 0..2000</a> %H A214086 Wikipedia, <a href="https://en.wikipedia.org/wiki/Inversion_(discrete_mathematics)">Inversion</a> %H A214086 Wikipedia, <a href="https://en.wikipedia.org/wiki/Involution_(mathematics)">Involution</a> %F A214086 a(n) = T(n,n) with T(n,k) = T(n-1,k) + Sum_{j=1..n-1} T(n-2,k-2*(n-j)+1) for n>=0, k>0; T(n,k) = 0 for n<0 or k<0; T(n,0) = 1 for n>=0. %F A214086 a(n) ~ c * d^n / sqrt(n), where d = 2.529010713480526199368... is the root of the equation 4 - 23*d - 36*d^2 - 8*d^3 + 4*d^5 = 0, c = 0.08933570507578447270759... . - _Vaclav Kotesovec_, Sep 07 2014 %e A214086 a(0) = 1: (), the empty involution. %e A214086 a(3) = 1: (3,2,1); inversions are (3,2), (3,1), (2,1). %e A214086 a(4) = 1: (3,4,1,2); inversions are (3,1), (3,2), (4,1), (4,2). %e A214086 a(5) = 2: (1,5,3,4,2), (4,2,3,1,5). %e A214086 a(6) = 10: (1,2,6,5,4,3), (1,4,6,2,5,3), (1,5,3,6,2,4), (1,5,4,3,2,6), (2,1,6,4,5,3), (3,2,1,6,5,4), (3,5,1,4,2,6), (4,2,3,1,6,5), (4,2,5,1,3,6), (4,3,2,1,5,6). %p A214086 T:= proc(n, k) option remember; `if`(n<0 or k<0, 0, `if`(k=0, 1, %p A214086 T(n-1, k) + add(T(n-2, k-2*(n-j)+1), j=1..n-1))) %p A214086 end: %p A214086 a:= n-> T(n$2): %p A214086 seq(a(n), n=0..50); %t A214086 Needs["Combinatorica`"]; %t A214086 Table[Count[Map[Inversions,Involutions[n]],n],{n,0,12}] %t A214086 (* Second program: *) %t A214086 T[n_, k_] := T[n, k] = If[n < 0 || k < 0, 0, If[k == 0, 1, T[n-1, k] + Sum[T[n-2, k-2*(n-j)+1], {j, 1, n-1}]]]; %t A214086 a[n_] := T[n, n]; %t A214086 Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Dec 04 2023, after Maple code *) %Y A214086 Diagonal of A213910. %Y A214086 Cf. A128566. %K A214086 nonn %O A214086 0,6 %A A214086 _Geoffrey Critzer_ and _Alois P. Heinz_, Mar 06 2013