cp's OEIS Frontend

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.

A246071 Number of endofunctions f on [2n] satisfying f^n(i) = i for all i in [n].

Original entry on oeis.org

1, 2, 50, 1440, 215760, 11218000, 8859219696, 549669946784, 797599992178688, 195297824029876992, 225830701916170080000, 33538442785393084937728, 478648537323384927696592896, 26649057768458576467019134976, 207869233649005397144301933676544
Offset: 0

Views

Author

Alois P. Heinz, Aug 12 2014

Keywords

Crossrefs

Cf. A246070.

Programs

  • Maple
    with(numtheory): with(combinat): M:=multinomial:
    b:= proc(n, k, p) local l, g; l, g:= sort([divisors(p)[]]),
          proc(k, m, i, t) option remember; local d, j; d:= l[i];
            `if`(i=1, n^m, add(M(k, k-(d-t)*j, (d-t)$j)/j!*
             (d-1)!^j *M(m, m-t*j, t$j) *g(k-(d-t)*j, m-t*j,
            `if`(d-t=1, [i-1, 0], [i, t+1])[]), j=0..min(k/(d-t),
            `if`(t=0, [][], m/t))))
          end; g(k, n-k, nops(l), 0)
        end:
    a:= n-> `if`(n=0, 1, b(2*n, n$2)):
    seq(a(n), n=0..20);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    M = multinomial;
    b[n_, k0_, p_] := Module[{l, g}, l = Divisors[p];
       g[k_, m_, i_, t_] := g[k, m, i, t] = Module[{d, j}, d = l[[i]];
       If[i == 1, If[m == 0, 1, n^m],  Sum[M[k, Join[{k - (d - t)*j},
       Table[d - t, {j}]]]/j!*If[j == 0, 1, (d - 1)!^j]*M[m, Join[{m - t*j},
       Array[t&, j]]]*g[k - (d - t)*j, m - t*j, Sequence @@
       If[d - t == 1, {i - 1, 0}, {i, t + 1}]], {j, 0, Min[k/(d - t),
       If[t == 0, {}, m/t]]}]]];
       g[k0, n - k0, Length[l], 0]];
    a[n_] := If[n == 0, 1, b[2*n, n, n]];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jun 27 2022, after Alois P. Heinz *)

Formula

a(n) = A246070(2n,n).