%I #43 Sep 22 2023 16:11:42
%S 1,2,21,196,2105,27636,451003,8938056,207358929,5451691060,
%T 158802143621,5051104945272,173783789845861,6424902913267216,
%U 253983495283150095,10692693172088104336,477787129703211313697,22591854186020941025268,1127404525137567577764013
%N a(n) is the number of endofunctions on an n-set where there is a single element with a preimage of maximum cardinality.
%H Alois P. Heinz, <a href="/A365061/b365061.txt">Table of n, a(n) for n = 1..340</a>
%H P. L. Krapivsky, <a href="https://arxiv.org/abs/2309.08834">Random Maps with Sociological Flavor</a>, arXiv:2309.08834 [math.CO], 2023. See p. 12.
%F a(n) = n*Sum_{b=1..n} binomial(n,b)*(n-b)!*[z^(n-b)](e^z*Gamma(b,z)/Gamma(b))^(n-1).
%F a(n) mod 2 = A000035(n). - _Alois P. Heinz_, Aug 25 2023
%p a:= proc(m) option remember; m*add(binomial(m, j)*
%p b(m-j, min(j-1, m-j), m-1), j=1..m)
%p end:
%p b:= proc(n, i, t) option remember; `if`(n=0, 1, add(
%p b(n-j, i, t-1) *binomial(n-1, j-1)*t, j=1..min(n, i)))
%p end:
%p seq(a(n), n=1..20); # _Alois P. Heinz_, Aug 25 2023
%t seriesCoeff[n_, b_] := seriesCoeff[n, b] = SeriesCoefficient[(Exp[z]*Gamma[b, z]/Gamma[b])^(n - 1), {z, 0, n - b}]; a[n_] := n*Total[Table[Binomial[n, b]*(n - b)!*seriesCoeff[n, b], {b, 1, n}]]; Monitor[Table[a[n], {n, 1, 19}], {n - 1, a[n - 1]}] (* _Robert P. P. McKone_, Aug 26 2023 *)
%o (Maxima) a(n):=n*sum(binomial(n,b)*(n-b)!*coeff(taylor((exp(z)* gamma_incomplete_regularized(b,z))^(n-1),z,0,n),z,n-b),b,1,n);
%Y Cf. A000035, A000312 (endofunctions), A351118.
%K nonn
%O 1,2
%A _Aaron O. Schweiger_, Aug 19 2023
%E a(16)-a(19) from _Alois P. Heinz_, Aug 25 2023