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.

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

This page as a plain text file.
%I A245959 #10 Oct 03 2019 04:21:13
%S A245959 1,2,36,1440,84624,7675200,962250624,151851992544,30421572307200,
%T A245959 7430515709340672,2142144445293849600,727442024443449689088,
%U A245959 285148327160858698469376,127152465871110917459189760,64226006581334387301393186816,36322574197169989225245335040000
%N A245959 Number of endofunctions f on [2n] satisfying f^3(i) = i for all i in [n].
%H A245959 Alois P. Heinz, <a href="/A245959/b245959.txt">Table of n, a(n) for n = 0..150</a>
%F A245959 a(n) = A245958(2n,n).
%p A245959 with(combinat): M:=multinomial:
%p A245959 T:= proc(n, k) local l, g; l, g:= [1, 3],
%p A245959       proc(k, m, i, t) option remember; local d, j; d:= l[i];
%p A245959         `if`(i=1, n^m, add(M(k, k-(d-t)*j, (d-t)$j)/j!*
%p A245959          (d-1)!^j *M(m, m-t*j, t$j) *g(k-(d-t)*j, m-t*j,
%p A245959         `if`(d-t=1, [i-1, 0], [i, t+1])[]), j=0..min(k/(d-t),
%p A245959         `if`(t=0, [][], m/t))))
%p A245959       end; g(k, n-k, nops(l), 0)
%p A245959     end:
%p A245959 a:= n-> T(2*n, n):
%p A245959 seq(a(n), n=0..20);
%t A245959 M[n_, m_, k_List] := n!/Times @@ (Join[{m}, k]!);
%t A245959 T[0, 0] = 1; T[n_, k_] := T[n, k] = Module[{l = {1, 3}, g}, g[k0_, m_, {i_, t_}] := g[k0, m, i, t]; g[k0_, m_, i_, t_] := g[k0, m, i, t] = Module[ {d}, d = l[[i]]; If[i == 1, n^m, Sum[M[k0, k0 - (d - t)*j, Table[(d - t), {j}]]/j!*(d - 1)!^j*M[m, m - t*j, Table[t, {j}]]*g[k0 - (d - t)*j, m - t*j, If[d - t == 1, {i - 1, 0}, {i, t + 1}]], {j, 0, Min[k0/(d - t), If[t == 0, Infinity, m/t]]}]]]; g[k, n - k, Length[l], 0]];
%t A245959 a[n_] := T[2 n, n];
%t A245959 a /@ Range[0, 20] (* _Jean-François Alcover_, Oct 03 2019, after _Alois P. Heinz_ *)
%Y A245959 Cf. A245958.
%Y A245959 Column k=3 of A246070.
%K A245959 nonn
%O A245959 0,2
%A A245959 _Alois P. Heinz_, Aug 08 2014