$\DeclareMathOperator\End{End}$Let $T\_n$ be the full transformation semigroup/monoid of $[n]=\{1,\dots,n\}$. Let $\End(T\_n)$ be the set of [endomorphisms][1] of $T\_n$. Then, $\# T\_n=n^n$ and
$$\# \End(T\_n)=n!\left[1+\sum\_{m=1}^n\sum\_{k=0}^{\lfloor\frac{m-1}2\rfloor}\sum\_{r=1}^{m-2k}\frac{m^{n-m}r^{m-k-r}}{2^k(n-m)!(m-2k-r)!k!r!}\right].$$



> 
> **Question.** (a) Is this limit true?
> $$\lim\_{n\rightarrow\infty}\frac{\# \End(T\_n)}{\# T\_n}=0.$$
> Clearly, the automorphism group of $T\_n$ is isomorphic to $\mathfrak{G}\_n$, the symmetric group on $[n]$.
> 
> 
> 



> 
> (b) If part (a) holds, then it is reasonable to ask how does $\End(T\_n)$ embed (in some sense, say injects) in $T\_n$?
> [1]: <https://en.wikipedia.org/wiki/Endomorphism>
> 
> 
> 



are endomorphisms "small" compared to the full transformations?
Looking at the exponential series, we have $\frac{r^k}{k!}\leq e^r$. Hence we have
$$
\frac{r^{m-k-r}}{(m-2k-r)!r!k!} = \frac{1}{r!}\frac{r^k}{k!}\frac{r^{m-2k-r}}{(m-2k-r)!} \leq\frac{e^{2r}}{r!}=\mathcal{O}(1).
$$
From this we obtain
$$
\#End(T\_n)\leq Cn! n^3\max\_m\frac{m^{n-m}}{(n-m)!} \leq Cn! n^3\max\_m\frac{m^{n-m}}{(n-m)!}.
$$
Put $m=\alpha n$. Then
$$
\frac{m^{n-m}}{(n-m)!}\leq \left(\frac{e\alpha}{1-\alpha}\right)^{(1-\alpha)n}.
$$
The maximum of $\left(\frac{e\alpha}{1-\alpha}\right)^{(1-\alpha)}$ is about $1.763$, thus for large $n$ we have $\#End(T\_n)\leq 1.77^n n!$, which is a lot smaller than $n^n\sim \frac{e^n n!}{\sqrt{2\pi n}}$.


