Let $(\mathbb{M},\cdot)$ be a finite monoid. Then there is some $n \leq |\mathbb{M}|!$ such that for every $k \in \mathbb{M}$ we have $k^n=k^{2n}$. My attempt: Let $k \in \mathbb M$. Since $\mathbb M$ is finite, there exist integers $i,l > 0$ sucht that $k^i = k^{i+l}$. It follows that, for all $n \geq i$, we have $k^n = k^{n+l}$. Now if $n$ is a multiple of $l$, say $n = pl$, we have $k^{2n} = k^{n + pl} = k^n$.
Is this argumentation correct so far? I think by a counting argument we can say, that there is some $n \leq |\mathbb M|!$, but I don't know exactly how to prove this part.
 A: In your attempt, choose a minimal non-negative integer $t$ for which there exists $p > 0$ such that $k^t = k^{t + p}$. Next choose the minimal
$p > 0$ satisfying this condition. This choice guarantees that the elements
$$
  k^0 = 1, k^1, k^2, \ldots, k^t, k^{t + 1}, \ldots, k^{t + p - 1}
$$
are all distinct. Furthermore, if $m \geqslant p$, writing $m = qp + r$
with $q \geqslant 1$ and $0 \leqslant r < p$ shows that $a^{t+m} = a^{t+ qp +r} = a^{t+r}$. It follows that $M = \{ 1, k,  \ldots, k^t, \ldots, k^{t + p - 1}\}$. Moreover, since $k^t = k^{t + p}$, the set $G = \{k^t, \ldots, k^{t + p - 1}\}$ forms a subsemigroup. I let you verify that the map $f: G \to \Bbb Z/p\Bbb Z$ defined by $f(k^{t + i}) \equiv t + i \bmod p$ is an isomorphism of semigroups. It follows that $G$ is a group with identity $e = k^{t + i}$ where $t + i \equiv 0 \bmod p$. Since $t + i \leqslant |M|$, we just proved that $k$ has an idempotent power $k^{n_k}$ with $n_k \leqslant |M|$. If follows that $x^{\text{lcm}\{1, \ldots, |M|\}}$ is idempotent for all $x \in M$. Finally, since $\text{lcm}\{1, \ldots, |M|\}$ divides $|M|!$, the element  $x^{|M|!}$ is also idempotent for all $x \in M$.
