Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #28 Oct 03 2019 10:02:15
%S 1,1,10,213,8056,465945,37823616,4075467781,560230714240,
%T 95369455852497,19643693349548800,4805295720474420501,
%U 1374890520609054683136,454286686896040037996905,171479277693049020232695808,73262491601904459123264721125,35143072854722729593790081499136
%N Number of pairs of functions (f,g) from a size n set into itself satisfying f(x) = g(g(f(x))).
%H Alois P. Heinz, <a href="/A239771/b239771.txt">Table of n, a(n) for n = 0..150</a>
%F a(n) = Sum_{k=0..n} C(n,k) * A048993(n,k) * k! * A245348(n,k). - _Alois P. Heinz_, Jul 18 2014
%p g:= proc(n) g(n):= `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
%p a:= n-> add(binomial(n, k)*Stirling2(n, k)*k!*
%p add(binomial(n-k, i)*binomial(k, i)*i!*
%p g(k-i)*n^(n-k-i), i=0..min(k, n-k)), k=0..n):
%p seq(a(n), n=0..20); # _Alois P. Heinz_, Jul 18 2014
%t g[n_] := g[n] = If[n < 2, 1, g[n-1] + (n-1)*g[n-2]];
%t a[n_] := If[n == 0, 1, Sum[Binomial[n, k]*StirlingS2[n, k]*k!*Sum[ Binomial[n-k, i]*Binomial[k, i]*i!*g[k-i]*n^(n-k-i), {i, 0, Min[k, n-k]} ], {k, 0, n}]];
%t a /@ Range[0, 20] (* _Jean-François Alcover_, Oct 03 2019, after _Alois P. Heinz_ *)
%Y Cf. A000085, A048993, A181162, A239769, A239773, A245348, A241015.
%Y Column k=2 of A245980.
%K nonn
%O 0,3
%A _Chad Brewbaker_, Mar 26 2014
%E a(6)-a(7) from _Giovanni Resta_, Mar 28 2014
%E a(8)-a(16) from _Alois P. Heinz_, Jul 18 2014