From *endomorphisms of rank 1* of the full transformation semigroup $[n]^{[n]}$ or *idempotents* in $[n]^{[n]}$, we have
$$c\_n:=\sum\_{m=1}^n\binom{n}mm^{n-m}.$$
Denote the $2$-adic valuation of $x$ by $\nu\_2(x)$.



> 
> **QUESTION.** Is it true that $\nu\_2(c\_n)=\nu\_2(n-1)$, for $n\geq2$?
> 
> 
> 



Divisibility question while enumerating endomorphisms: PART 2
Yes, this is true. The idea is to get $n-1$ out of the sum as a multiple.


We have $$c\_n=1+\sum\_{m=1}^{n-1}m{n\choose m}m^{n-1-m}=1+\sum\_{m=1}^{n-1}n{n-1\choose m-1}m^{n-1-m}$$
We see that if $n$ is even, then $c\_n$ is odd.


Now let $n>1$ be odd. Then proceed this way:$$c\_n=1+n\sum\_{m=1}^{n-1}{n-1\choose m-1}+n\sum\_{m=2}^{n-2}{n-1\choose m-1}(m^{n-1-m}-1)\\=1+n(2^{n-1}-1)+n(n-1)\sum\_{m=2}^{n-2}{n-2\choose m-2}\cdot \frac{m^{n-1-m}-1}{m-1}\\=:1+n(2^{n-1}-1)+n(n-1)A.$$
Modulo 2 we have $$\frac{m^{n-1-m}-1}{m-1}=1+m+\ldots+m^{n-m-2}\equiv 1+m(n-m-2)\equiv 1,$$
so
$$
A\equiv \sum\_{m=2}^{n-2} {n-2\choose m-2}=2^{n-2}-1-(n-2)\equiv 0\pmod 2.
$$
Then $c\_n=(1-n)+(n2^{n-1})+n(n-1)A$, and $1-n$ has 2-adic valuation strictly smaller than two other summands, thus $\nu\_2(c\_n)=\nu\_2(1-n)$.


