login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246071 Number of endofunctions f on [2n] satisfying f^n(i) = i for all i in [n]. 2

%I #9 Jun 27 2022 07:51:06

%S 1,2,50,1440,215760,11218000,8859219696,549669946784,797599992178688,

%T 195297824029876992,225830701916170080000,33538442785393084937728,

%U 478648537323384927696592896,26649057768458576467019134976,207869233649005397144301933676544

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

%H Alois P. Heinz, <a href="/A246071/b246071.txt">Table of n, a(n) for n = 0..100</a>

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

%p with(numtheory): with(combinat): M:=multinomial:

%p b:= proc(n, k, p) local l, g; l, g:= sort([divisors(p)[]]),

%p proc(k, m, i, t) option remember; local d, j; d:= l[i];

%p `if`(i=1, n^m, add(M(k, k-(d-t)*j, (d-t)$j)/j!*

%p (d-1)!^j *M(m, m-t*j, t$j) *g(k-(d-t)*j, m-t*j,

%p `if`(d-t=1, [i-1, 0], [i, t+1])[]), j=0..min(k/(d-t),

%p `if`(t=0, [][], m/t))))

%p end; g(k, n-k, nops(l), 0)

%p end:

%p a:= n-> `if`(n=0, 1, b(2*n, n$2)):

%p seq(a(n), n=0..20);

%t multinomial[n_, k_List] := n!/Times @@ (k!);

%t M = multinomial;

%t b[n_, k0_, p_] := Module[{l, g}, l = Divisors[p];

%t g[k_, m_, i_, t_] := g[k, m, i, t] = Module[{d, j}, d = l[[i]];

%t If[i == 1, If[m == 0, 1, n^m], Sum[M[k, Join[{k - (d - t)*j},

%t Table[d - t, {j}]]]/j!*If[j == 0, 1, (d - 1)!^j]*M[m, Join[{m - t*j},

%t Array[t&, j]]]*g[k - (d - t)*j, m - t*j, Sequence @@

%t If[d - t == 1, {i - 1, 0}, {i, t + 1}]], {j, 0, Min[k/(d - t),

%t If[t == 0, {}, m/t]]}]]];

%t g[k0, n - k0, Length[l], 0]];

%t a[n_] := If[n == 0, 1, b[2*n, n, n]];

%t Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, Jun 27 2022, after _Alois P. Heinz_ *)

%Y Cf. A246070.

%K nonn

%O 0,2

%A _Alois P. Heinz_, Aug 12 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)