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.

A245988 Number of pairs of endofunctions f, g on [n] satisfying g^n(f(i)) = f(i) for all i in [n].

This page as a plain text file.
%I A245988 #11 Apr 29 2022 05:50:11
%S A245988 1,1,10,141,9592,159245,86252976,908888155,1682479423360,
%T A245988 128805405787953,93998774487116800,1099662085349496911,
%U A245988 44830846497021739693056,147548082727234113659293,3534565745374740945151080448,1613371163531618738559582856125
%N A245988 Number of pairs of endofunctions f, g on [n] satisfying g^n(f(i)) = f(i) for all i in [n].
%H A245988 Alois P. Heinz, <a href="/A245988/b245988.txt">Table of n, a(n) for n = 0..100</a>
%F A245988 a(n) = A245980(n,n).
%p A245988 with(numtheory): with(combinat): M:=multinomial:
%p A245988 a:= proc(n) option remember; local l, g; l, g:= sort([divisors(n)[]]),
%p A245988       proc(k, m, i, t) option remember; local d, j; d:= l[i];
%p A245988         `if`(i=1, n^m, add(M(k, k-(d-t)*j, (d-t)$j)/j!*
%p A245988          (d-1)!^j *M(m, m-t*j, t$j) *g(k-(d-t)*j, m-t*j,
%p A245988         `if`(d-t=1, [i-1, 0], [i, t+1])[]), j=0..min(k/(d-t),
%p A245988         `if`(t=0, [][], m/t))))
%p A245988       end; forget(g);
%p A245988       `if`(n=0, 1, add(g(j, n-j, nops(l), 0)*
%p A245988       stirling2(n, j)*binomial(n, j)*j!, j=0..n))
%p A245988     end:
%p A245988 seq(a(n), n=0..20);
%t A245988 multinomial[n_, k_List] := n!/Times @@ (k!); M = multinomial;
%t A245988 b[n_, k0_, p_] := Module[{l, g}, l = Sort[Divisors[p]];
%t A245988     g[k_, m_, i_, t_] := g[k, m, i, t] = Module[{d, j}, d = l[[i]];
%t A245988     If[i == 1, n^m, Sum[M[k, Join[{k-(d-t)*j}, Array[(d - t) &, j]]]/j!*
%t A245988     (d - 1)!^j*M[m, Join[{m - t*j}, Array[t &, j]]]*
%t A245988     If[d - t == 1, g[k - (d - t)*j, m - t*j, i - 1, 0],
%t A245988     g[k - (d - t)*j, m - t*j, i, t + 1]], {j, 0, Min[k/(d - t),
%t A245988     If[t == 0, Infinity, m/t]]}]]]; g[k0, n - k0, Length[l], 0]];
%t A245988 A[n_, k_] := If[k == 0, n^(2*n), Sum[b[n, j, k]*StirlingS2[n,j]*Binomial[n, j]*j!, {j, 0, n}]];
%t A245988 A[0, _] = A[1, _] = 1;
%t A245988 a[n_] := A[n, n];
%t A245988 Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, Apr 29 2022, after _Alois P. Heinz_ in A245980 *)
%Y A245988 Main diagonal of A245980.
%Y A245988 Cf. A245911.
%K A245988 nonn
%O A245988 0,3
%A A245988 _Alois P. Heinz_, Aug 08 2014