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 A246071 #9 Jun 27 2022 07:51:06 %S A246071 1,2,50,1440,215760,11218000,8859219696,549669946784,797599992178688, %T A246071 195297824029876992,225830701916170080000,33538442785393084937728, %U A246071 478648537323384927696592896,26649057768458576467019134976,207869233649005397144301933676544 %N A246071 Number of endofunctions f on [2n] satisfying f^n(i) = i for all i in [n]. %H A246071 Alois P. Heinz, <a href="/A246071/b246071.txt">Table of n, a(n) for n = 0..100</a> %F A246071 a(n) = A246070(2n,n). %p A246071 with(numtheory): with(combinat): M:=multinomial: %p A246071 b:= proc(n, k, p) local l, g; l, g:= sort([divisors(p)[]]), %p A246071 proc(k, m, i, t) option remember; local d, j; d:= l[i]; %p A246071 `if`(i=1, n^m, add(M(k, k-(d-t)*j, (d-t)$j)/j!* %p A246071 (d-1)!^j *M(m, m-t*j, t$j) *g(k-(d-t)*j, m-t*j, %p A246071 `if`(d-t=1, [i-1, 0], [i, t+1])[]), j=0..min(k/(d-t), %p A246071 `if`(t=0, [][], m/t)))) %p A246071 end; g(k, n-k, nops(l), 0) %p A246071 end: %p A246071 a:= n-> `if`(n=0, 1, b(2*n, n$2)): %p A246071 seq(a(n), n=0..20); %t A246071 multinomial[n_, k_List] := n!/Times @@ (k!); %t A246071 M = multinomial; %t A246071 b[n_, k0_, p_] := Module[{l, g}, l = Divisors[p]; %t A246071 g[k_, m_, i_, t_] := g[k, m, i, t] = Module[{d, j}, d = l[[i]]; %t A246071 If[i == 1, If[m == 0, 1, n^m], Sum[M[k, Join[{k - (d - t)*j}, %t A246071 Table[d - t, {j}]]]/j!*If[j == 0, 1, (d - 1)!^j]*M[m, Join[{m - t*j}, %t A246071 Array[t&, j]]]*g[k - (d - t)*j, m - t*j, Sequence @@ %t A246071 If[d - t == 1, {i - 1, 0}, {i, t + 1}]], {j, 0, Min[k/(d - t), %t A246071 If[t == 0, {}, m/t]]}]]]; %t A246071 g[k0, n - k0, Length[l], 0]]; %t A246071 a[n_] := If[n == 0, 1, b[2*n, n, n]]; %t A246071 Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, Jun 27 2022, after _Alois P. Heinz_ *) %Y A246071 Cf. A246070. %K A246071 nonn %O A246071 0,2 %A A246071 _Alois P. Heinz_, Aug 12 2014