TITLE: Ring and sum of idempotent elements
QUESTION [5 upvotes]: Let $R$ be a ring with identity which for every $x\in R$ there exist two idempotent elements $e_1,e_2$ such that $x=e_1+e_2$ and $e_1e_2=e_2e_1$. Prove that: $x^3=x$ for every $x\in R$.

REPLY [6 votes]: 1. Answering the question
You don't need $R$ to have an identity. More generally, let me show:

Problem. Let $R$ be any nonunital ring. Assume that for every $x \in R$, there exist two idempotent elements $e_1$ and $e_2$ of $R$ such that $x = e_1 + e_2$ and $e_1 e_2 = e_2 e_1$. Prove that every $x \in R$ satisfies $6x = 0$ and $x^3 = x$.

Solution. Let $x \in R$ be arbitrary. Then, (by assumption) we know that there exist two idempotent elements $e_1$ and $e_2$ of $R$ such that $x = e_1 + e_2$ and $e_1 e_2 = e_2 e_1$. Consider these $e_1$ and $e_2$. Since $e_1$ and $e_2$ are idempotent, we have $e_1^2 = e_1$ and $e_2^2 = e_2$. Squaring both sides of the equality $x = e_1 + e_2$, we obtain $x^2 = \left(e_1 + e_2\right)^2 = \underbrace{e_1^2}_{=e_1} + \underbrace{e_2^2}_{=e_2} + e_1 e_2 + \underbrace{e_2 e_1}_{=e_1 e_2} = \underbrace{e_1 + e_2}_{=x} + \underbrace{e_1 e_2 + e_1 e_2}_{= 2 e_1 e_2} = x + 2 e_1 e_2$. Hence, $x^2 - x = 2 e_1 e_2$. Now,
$x^3 - x = \underbrace{x}_{=e_1 + e_2}\underbrace{\left(x^2 - x\right)}_{= 2 e_1 e_2} + \underbrace{\left(x^2 - x\right)}_{= 2 e_1 e_2} = \underbrace{\left(e_1 + e_2\right) 2 e_1 e_2}_{= 2 e_1 e_1 e_2 + 2 e_2 e_1 e_2} + 2 e_1 e_2$
$= 2 \underbrace{e_1 e_1}_{= e_1^2 = e_1} e_2 + 2 \underbrace{e_2 e_1}_{= e_2^2} e_2 + 2 e_1 e_2 = 2 e_1 e_2 + 2 e_2 \underbrace{e_1 e_1}_{= e_1^2 = e_1} + 2 e_1 e_2 = 2 e_1 e_2 + 2 \underbrace{e_2 e_1}_{= e_1 e_2} + 2 e_1 e_2$
$= 2 e_1 e_2 + 2 e_1 e_2 + 2 e_1 e_2 = 3 \cdot \underbrace{2 e_1 e_2}_{= x^2 - x} = 3 \cdot \left(x^2-x\right)$.
We now forget that we fixed $x$. We thus have shown that
\begin{equation}
x^3 - x = 3 \cdot \left(x^2-x\right) \qquad \text{ for every $x \in R$.}
\label{darij.sol.1}
\tag{1}
\end{equation}
Now, let $x \in R$ again. Applying \eqref{darij.sol.1} to $-x$ instead of $x$, we obtain
\begin{equation}
\left(-x\right)^3 - \left(-x\right) = 3 \cdot \left(\left(-x\right)^2-\left(-x\right)\right) .
\end{equation}
Adding this equality to \eqref{darij.sol.1}, we obtain
\begin{equation}
x^3 - x + \left(-x\right)^3 - \left(-x\right) = 3 \cdot \left(x^2 - x\right) + 3 \cdot \left(\left(-x\right)^2-\left(-x\right)\right) .
\end{equation}
After cancelling terms, this simplifies to $0 = 6x^2$. Thus, $6x^2 = 0$.
We now forget that we fixed $x$. We thus have shown that
\begin{equation}
6x^2 = 0 \qquad \text{ for every $x \in R$.}
\label{darij.sol.2}
\tag{2}
\end{equation}
Now, let $x \in R$ again. Then, (by assumption) we know that there exist two idempotent elements $e_1$ and $e_2$ of $R$ such that $x = e_1 + e_2$ and $e_1 e_2 = e_2 e_1$. Consider these $e_1$ and $e_2$. Since $e_1$ is idempotent, we have $e_1^2 = e_1$. But \eqref{darij.sol.2} (applied to $e_1$ instead of $x$) gives $6 e_1^2 = 0$. Thus, $6 \underbrace{e_1}_{=e_1^2} = 6 e_1^2 = 0$. Similarly, $6 e_2 = 0$. Now, $6 \underbrace{x}_{= e_1 + e_2} = 6\left(e_1 + e_2\right) = \underbrace{6 e_1}_{=0} + \underbrace{6 e_2}_{=0} = 0$. Finally, recall that $x^2 - x = 2 e_1 e_2$ (we have already shown this above), and \eqref{darij.sol.1} yields
\begin{equation}
x^3 - x = 3 \cdot \underbrace{\left(x^2 - x\right)}_{= 2 e_1 e_2} = 3 \cdot 2 e_1 e_2 = \underbrace{6 e_1}_{=0} e_2 = 0 ,
\end{equation}
so that $x^3 = x$. Thus the problem is solved. $\blacksquare$

Addendum. Let $R$ be as in the Problem above. Then, the ring $R$ is commutative.

Proof. The Problem shows that $x^3 = x$ for all $x \in R$. Hence, a classical fact yields that $R$ is commutative. This proves the Addendum. $\blacksquare$
2. Generalizing to $n$ idempotents
Here is a generalization of the "$6x=0$" part of the above problem:

Theorem 1. Let $n$ be a nonnegative integer. Let $R$ be a nonunital ring
  such that every element of $R$ is a sum of $n$ pairwise commuting idempotents.
  Then, $\left(  n+1\right)  !x=0$ for all $x\in R$.

The proof of this theorem will require several auxiliary results, which in my
opinion are interesting on their own.
We let $\mathbb{N}$ be the set $\left\{  0,1,2,\ldots\right\}  $ of all
nonnegative integers. If $n\in\mathbb{N}$, then $\left[  n\right]  $ shall
denote the $n$-element set $\left\{  1,2,\ldots,n\right\}  $. We recall the
product rule:

Proposition 2. Let $m\in\mathbb{N}$. Let $R$ be a unital ring. Let $I$ be
  a finite set. For each $u\in\left[  m\right]  $ and $v\in I$, let $P_{u,v}$ be
  an element of $R$. Then,
  \begin{equation}
\left(  \sum_{i\in I}P_{1,i}\right)  \left(  \sum_{i\in I}P_{2,i}\right)
\cdots\left(  \sum_{i\in I}P_{m,i}\right)  =\sum_{\left(  i_{1},i_{2}
,\ldots,i_{m}\right)  \in I^{m}}P_{1,i_{1}}P_{2,i_{2}}\cdots P_{m,i_{m}}.
\end{equation}

(This is a known fact, and is easily proven by induction on $m$; intuitively
it is obvious anyway.)
Let us first prove a basic property of sums of idempotents in unital
commutative rings:

Proposition 3. Let $R$ be a unital commutative ring. Let $n\in\mathbb{N}$.
  Let $e_1 ,e_2 ,\ldots,e_n $ be $n$ idempotents in $R$. Let $x=e_1 
+e_2 +\cdots+e_n $. Then,
  \begin{equation}
x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(  x-n\right)  =0.
\end{equation}
  (Here, of course, $1,2,\ldots,n$ denote the corresponding elements of $R$.)

Proof of Proposition 3. For each $u\in\left[  n\right]  $ and $v\in\left\{
0,1\right\}  $, we define an element $P_{u,v}$ of $R$ by
\begin{equation}
P_{u,v}=
\begin{cases}
1-e_{u}, & \text{if }v=0;\\
e_{u}, & \text{if }v=1.
\end{cases}
\end{equation}
Then, each $u\in\left[  n\right]  $ satisfies
\begin{equation}
\sum_{i\in\left\{  0,1\right\}  }P_{u,i}=\underbrace{P_{u,0}}
_{\substack{=1-e_{u}\\\text{(by the definition of }P_{u,0}\text{)}
}}+\underbrace{P_{u,1}}_{\substack{=e_{u}\\\text{(by the definition of
}P_{u,1}\text{)}}}=\left(  1-e_{u}\right)  +e_{u}=1.
\end{equation}
Multiplying these equalities for all $u\in\left[  n\right]  $, we obtain
\begin{equation}
\left(  \sum_{i\in\left\{  0,1\right\}  }P_{1,i}\right)  \left(  \sum
_{i\in\left\{  0,1\right\}  }P_{2,i}\right)  \cdots\left(  \sum_{i\in\left\{
0,1\right\}  }P_{n,i}\right)  =\underbrace{1\cdot1\cdot\cdots\cdot1}_{n\text{
times}}=1.
\end{equation}
Hence,
\begin{align}
1  &  =\left(  \sum_{i\in\left\{  0,1\right\}  }P_{1,i}\right)  \left(
\sum_{i\in\left\{  0,1\right\}  }P_{2,i}\right)  \cdots\left(  \sum
_{i\in\left\{  0,1\right\}  }P_{n,i}\right) \nonumber\\
&  =\sum_{\left(  i_{1},i_{2},\ldots,i_{n}\right)  \in\left\{  0,1\right\}
^{n}}P_{1,i_1}P_{2,i_2}\cdots P_{n,i_n}
\label{darij.pf.prop.3.1}
\tag{3}
\end{align}
(by Proposition 2, applied to $m=n$ and $I=\left\{  0,1\right\}  $).
Next, I claim that
\begin{equation}
\left(  e_{u}-i_{u}\right)  \left(  P_{1,i_1}P_{2,i_2}\cdots P_{n,i_n}
\right)  =0
\label{darij.pf.prop.3.2a}
\tag{4}
\end{equation}
for each $\left(  i_1 ,i_2 ,\ldots,i_n \right)  \in\left\{  0,1\right\}
^{n}$ and each $u\in\left[  n\right]  $.
[Proof of \eqref{darij.pf.prop.3.2a}: Let $\left(  i_1 ,i_2 ,\ldots
,i_n \right)  \in\left\{  0,1\right\}  ^{n}$ and $u\in\left[  n\right]  $. We
shall show that $\left(  e_{u}-i_{u}\right)  P_{u,i_{u}}=0$.
Note that $e_{u}$ is idempotent (since $e_1 ,e_2 ,\ldots,e_n $ are $n$
idempotents), so that $e_{u}^{2}=e_{u}$.
We have $i_{u}\in\left\{  0,1\right\}  $ (since $\left(  i_1 ,i_2 
,\ldots,i_n \right)  \in\left\{  0,1\right\}  ^{n}$), so that we have either
$i_{u}=1$ or $i_{u}=0$. Thus, we are in one of the following two cases:
Case 1: We have $i_{u}=1$.
Case 2: We have $i_{u}=0$.
Let us first consider Case 1. In this case, we have $i_{u}=1$. Thus,
$P_{u,i_{u}}=P_{u,1}=e_{u}$ (by the definition of $P_{u,1}$). Thus,
\begin{equation}
\left(  e_{u}-\underbrace{i_{u}}_{=1}\right)  \underbrace{P_{u,i_{u}}}
_{=e_{u}}=\left(  e_{u}-1\right)  e_{u}=e_{u}^{2}-e_{u}=0
\end{equation}
(since $e_{u}^{2}=e_{u}$). Thus, $\left(  e_{u}-i_{u}\right)  P_{u,i_{u}}=0$
is proven in Case 1.
Next, let us consider Case 2. In this case, we have $i_{u}=0$. Thus,
$P_{u,i_{u}}=P_{u,0}=1-e_{u}$ (by the definition of $P_{u,0}$). Thus,
\begin{equation}
\left(  e_{u}-\underbrace{i_{u}}_{=0}\right)  \underbrace{P_{u,i_{u}}
}_{=1-e_{u}}=\left(  e_{u}-0\right)  \left(  1-e_{u}\right)  =e_{u}-e_{u}
^{2}=0
\end{equation}
(since $e_{u}^{2}=e_{u}$). Thus, $\left(  e_{u}-i_{u}\right)  P_{u,i_{u}}=0$
is proven in Case 2.
We have now proven $\left(  e_{u}-i_{u}\right)  P_{u,i_{u}}=0$ in both Cases 1
and 2. Thus, $\left(  e_{u}-i_{u}\right)  P_{u,i_{u}}=0$ always holds.
But
\begin{equation}
P_{1,i_1 }P_{2,i_2 }\cdots P_{n,i_n }=\prod_{v\in\left[  n\right]
}P_{v,i_{v}}=P_{u,i_{u}}\prod_{\substack{v\in\left[  n\right]  ;\\v\neq
u}}P_{v,i_{v}}
\end{equation}
(here, we have split off the factor for $v=u$ from the product, since $R$ is
commutative). Hence,
\begin{equation}
\left(  e_{u}-i_{u}\right)  \underbrace{\left(  P_{1,i_1 }P_{2,i_2 }\cdots
P_{n,i_n }\right)  }_{=P_{u,i_{u}}\prod_{\substack{v\in\left[  n\right]
;\\v\neq u}}P_{v,i_{v}}}=\underbrace{\left(  e_{u}-i_{u}\right)  P_{u,i_{u}}
}_{=0}\prod_{\substack{v\in\left[  n\right]  ;\\v\neq u}}P_{v,i_{v}}=0.
\end{equation}
This proves \eqref{darij.pf.prop.3.2a}.]
Next, I claim that
\begin{equation}
\left(  x-\sum_{j\in\left[  n\right]  }i_{j}\right)  \left(  P_{1,i_1 
}P_{2,i_2 }\cdots P_{n,i_n }\right)  =0
\label{darij.pf.prop.3.2}
\tag{5}
\end{equation}
for each $\left(  i_1 ,i_2 ,\ldots,i_n \right)  \in\left\{  0,1\right\}
^{n}$.
[Proof of \eqref{darij.pf.prop.3.2}: Let $\left(  i_1 ,i_2 ,\ldots
,i_n \right)  \in\left\{  0,1\right\}  ^{n}$. Recall that $x=e_1 
+e_2 +\cdots+e_n =\sum_{j\in\left[  n\right]  }e_{j}$. Thus,
\begin{equation}
x-\sum_{j\in\left[  n\right]  }i_{j}=\sum_{j\in\left[  n\right]  }e_{j}
-\sum_{j\in\left[  n\right]  }i_{j}=\sum_{j\in\left[  n\right]  }\left(
e_{j}-i_{j}\right)  =\sum_{u\in\left[  n\right]  }\left(  e_{u}-i_{u}\right)
.
\end{equation}
Multiplying both sides of this equality by $P_{1,i_1 }P_{2,i_2 }\cdots
P_{n,i_n }$, we find
\begin{align*}
&  \left(  x-\sum_{j\in\left[  n\right]  }i_{j}\right)  \left(  P_{1,i_1 
}P_{2,i_2 }\cdots P_{n,i_n }\right) \\
&  =\left(  \sum_{u\in\left[  n\right]  }\left(  e_{u}-i_{u}\right)  \right)
\left(  P_{1,i_1 }P_{2,i_2 }\cdots P_{n,i_n }\right) \\
&  =\sum_{u\in\left[  n\right]  }\underbrace{\left(  e_{u}-i_{u}\right)
\left(  P_{1,i_1 }P_{2,i_2 }\cdots P_{n,i_n }\right)  }
_{\substack{=0\\\text{(by \eqref{darij.pf.prop.3.2a})}}}=0.
\end{align*}
This proves \eqref{darij.pf.prop.3.2}.]
Now, let $y=x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(  x-n\right)
$. Then, I claim that
\begin{equation}
y\left(  P_{1,i_1 }P_{2,i_2 }\cdots P_{n,i_n }\right)  =0
\label{darij.pf.prop.3.3}
\tag{6}
\end{equation}
for each $\left(  i_1 ,i_2 ,\ldots,i_n \right)  \in\left\{  0,1\right\}
^{n}$.
[Proof of \eqref{darij.pf.prop.3.3}: Let $\left(  i_1 ,i_2 ,\ldots
,i_n \right)  \in\left\{  0,1\right\}  ^{n}$. Let $m=\sum_{j\in\left[
n\right]  }i_{j}$. Then, $m$ is a sum of $n$ elements of the set $\left\{
0,1\right\}  $ (since $i_1 ,i_2 ,\ldots,i_n $ are $n$ elements of the set
$\left\{  0,1\right\}  $), and thus is an integer between $0$ and $n$. In
other words, $m\in\left\{  0,1,\ldots,n\right\}  $. Hence, $x-m$ is a factor
of the product $x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(
x-n\right)  $. Thus, the product $x\left(  x-1\right)  \left(  x-2\right)
\cdots\left(  x-n\right)  $ is a multiple of $x-m$. In other words, $y$ is a
multiple of $x-m$ (since $y=x\left(  x-1\right)  \left(  x-2\right)
\cdots\left(  x-n\right)  $). In other words, there exists a $z\in R$ such
that $y=z\left(  x-m\right)  $. Consider this $z$.
From \eqref{darij.pf.prop.3.2}, we obtain $\left(  x-\sum_{j\in\left[
n\right]  }i_{j}\right)  \left(  P_{1,i_1 }P_{2,i_2 }\cdots P_{n,i_n 
}\right)  =0$. In view of $m=\sum_{j\in\left[  n\right]  }i_{j}$, this
rewrites as $\left(  x-m\right)  \left(  P_{1,i_1 }P_{2,i_2 }\cdots
P_{n,i_n }\right)  =0$. Now,
\begin{equation}
\underbrace{y}_{=z\left(  x-m\right)  }\left(  P_{1,i_1 }P_{2,i_2 }\cdots
P_{n,i_n }\right)  =z\underbrace{\left(  x-m\right)  \left(  P_{1,i_1 
}P_{2,i_2 }\cdots P_{n,i_n }\right)  }_{=0}=0.
\end{equation}
This proves \eqref{darij.pf.prop.3.3}.]
Now,
\begin{align*}
&  x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(  x-n\right) \\
&  =y=y\cdot1\\
&  =y\cdot\sum_{\left(  i_1 ,i_2 ,\ldots,i_n \right)  \in\left\{
0,1\right\}  ^{n}}P_{1,i_1 }P_{2,i_2 }\cdots P_{n,i_n }\\
&  \qquad\left(
\begin{array}
[c]{c}
\text{here, we have multiplied both sides of}\\
\text{the equality \eqref{darij.pf.prop.3.1} by }y
\end{array}
\right) \\
&  =\sum_{\left(  i_1 ,i_2 ,\ldots,i_n \right)  \in\left\{  0,1\right\}
^{n}}\underbrace{y\left(  P_{1,i_1 }P_{2,i_2 }\cdots P_{n,i_n }\right)
}_{\substack{=0\\\text{(by \eqref{darij.pf.prop.3.3})}}}=0.
\end{align*}
This proves Proposition 3. $\blacksquare$
Now let us generalize Proposition 3 by replacing the "global" commutativity of
$R$ by the "local" commutativity of our $n$ idempotents; this is a cheap generalization:

Proposition 4. Let $R$ be a unital ring. Let $n\in\mathbb{N}$. Let
  $e_1 ,e_2 ,\ldots,e_n $ be $n$ pairwise commuting idempotents in $R$. Let
  $x=e_1 +e_2 +\cdots+e_n $. Then,
  \begin{equation}
x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(  x-n\right)  =0.
\end{equation}
  (Here, of course, $1,2,\ldots,n$ denote the corresponding elements of $R$.)

Proof of Proposition 4. We know that $R$ is a unital ring, thus a
$\mathbb{Z}$-algebra. Let $S$ be the $\mathbb{Z}$-subalgebra of $R$ generated
by $e_1 ,e_2 ,\ldots,e_n $. Then, $S$ is a $\mathbb{Z}$-algebra generated
by $n$ pairwise commuting elements (since its $n$ generators $e_1 
,e_2 ,\ldots,e_n $ pairwise commute), and thus is commutative itself
(because any $\mathbb{Z}$-algebra generated by pairwise commuting elements is
commutative). Thus, $S$ is a unital commutative ring. Moreover, the $n$
elements $e_1 ,e_2 ,\ldots,e_n $ belong to $S$ (since they together
generate $S$ as a $\mathbb{Z}$-algebra), and thus their sum $x=e_1 
+e_2 +\cdots+e_n $ belongs to $S$ as well. Hence, Proposition 3 (applied to
$S$ instead of $R$) shows that $x\left(  x-1\right)  \left(  x-2\right)
\cdots\left(  x-n\right)  =0$. This proves Proposition 4. $\blacksquare$

Proposition 5. Let $R$ be a unital ring. Let $e\in R$ be idempotent. Let
  $p\in\mathbb{Z}$. Let $x=pe\in R$. Then, each $n\in\mathbb{N}$ satisfies
  \begin{equation}
x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(  x-n\right)  =\left(
p\left(  p-1\right)  \left(  p-2\right)  \cdots\left(  p-n\right)  \right)  e.
\label{darij.eq.prop.5.1}
\tag{7}
\end{equation}

Proof of Proposition 5. We shall prove \eqref{darij.eq.prop.5.1} by
induction on $n$:
Induction base: We have $x=pe$. In other words, \eqref{darij.eq.prop.5.1}
holds for $n=0$. This concludes the induction base.
Induction step: Let $N$ be a positive integer. Assume that
\eqref{darij.eq.prop.5.1} holds for $n=N-1$. We must prove that
\eqref{darij.eq.prop.5.1} holds for $n=N$ as well.
We have assumed that \eqref{darij.eq.prop.5.1} holds for $n=N-1$. In other
words,
\begin{equation}
x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(  x-\left(  N-1\right)
\right)  =\left(  p\left(  p-1\right)  \left(  p-2\right)  \cdots\left(
p-\left(  N-1\right)  \right)  \right)  e.
\end{equation}
But $e$ is idempotent, so that $e^{2}=e$. We have
\begin{equation}
e\cdot\left(  pe-N\right)  =e\cdot pe-eN=p\underbrace{e^{2}}_{=e}
-Ne=pe-Ne=\left(  p-N\right)  e.
\end{equation}
Now,
\begin{align*}
&  x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(  x-N\right) \\
&  =\underbrace{\left(  x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(
x-\left(  N-1\right)  \right)  \right)  }_{=\left(  p\left(  p-1\right)
\left(  p-2\right)  \cdots\left(  p-\left(  N-1\right)  \right)  \right)
e}\cdot\left(  \underbrace{x}_{=pe}-N\right) \\
&  =\left(  p\left(  p-1\right)  \left(  p-2\right)  \cdots\left(  p-\left(
N-1\right)  \right)  \right)  \underbrace{e\cdot\left(  pe-N\right)
}_{=\left(  p-N\right)  e}\\
&  =\underbrace{\left(  p\left(  p-1\right)  \left(  p-2\right)  \cdots\left(
p-\left(  N-1\right)  \right)  \right)  \cdot\left(  p-N\right)  }_{=p\left(
p-1\right)  \left(  p-2\right)  \cdots\left(  p-N\right)  }e\\
&  =\left(  p\left(  p-1\right)  \left(  p-2\right)  \cdots\left(  p-N\right)
\right)  e.
\end{align*}
In other words, \eqref{darij.eq.prop.5.1} holds for $n=N$ as well. This
completes the induction step. Thus, \eqref{darij.eq.prop.5.1} is proven by
induction; i.e., Proposition 5 is proven. $\blacksquare$

Corollary 6. Let $R$ be a unital ring. Let $e\in R$ be idempotent. Let
  $n\in\mathbb{N}$. Assume that $\left(  n+1\right)  e$ is a sum of $n$ pairwise
  commuting idempotents in $R$. Then, $\left(  n+1\right)  !e=0$.

Proof of Corollary 6. We have assumed that $\left(  n+1\right)  e$ is a sum
of $n$ pairwise commuting idempotents in $R$. In other words, there exist $n$
pairwise commuting idempotents $e_1 ,e_2 ,\ldots,e_n $ such that $\left(
n+1\right)  e=e_1 +e_2 +\cdots+e_n $. Consider these $e_1 ,e_2 
,\ldots,e_n $.
Let $x=\left(  n+1\right)  e$. Thus, $x=\left(  n+1\right)  e=e_1 
+e_2 +\cdots+e_n $. Hence, Proposition 4 yields
\begin{equation}
x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(  x-n\right)  =0.
\end{equation}
But Proposition 5 (applied to $p=n+1$) yields
\begin{align*}
x\left(  x-1\right)  \left(  x-2\right)  \cdots\left(  x-n\right)   &
=\underbrace{\left(  \left(  n+1\right)  \left(  \left(  n+1\right)
-1\right)  \left(  \left(  n+1\right)  -2\right)  \cdots\left(  \left(
n+1\right)  -n\right)  \right)  }_{\substack{=\left(  n+1\right)  n\left(
n-1\right)  \cdots1\\=\left(  n+1\right)  !}}e\\
&  =\left(  n+1\right)  !e.
\end{align*}
Comparing these two equalities, we obtain $\left(  n+1\right)  !e=0$. This
proves Corollary 6. $\blacksquare$
Our next goal is to extend Corollary 6 to nonunital rings. There are several
ways to do so. The simplest one is to embed a nonunital ring $R$ into a unital
ring, e.g., via the Dorroh
extension. Here is a
slightly different one, in which we don't exactly embed $R$ into a unital
ring, but construct a nonunital ring homomorphism from $R$ into a unital ring
that is "injective enough" for idempotents (despite not generally being injective).

Definition. Let $R$ be a nonunital ring.
(a) We let $\operatorname{End} R$ be the unital ring of all endomorphisms
  of the $\mathbb{Z}$-module $R$ (that is, of all $\mathbb{Z}$-linear maps
  $R\rightarrow R$).
(b) If $r\in R$, then $L_r$ shall denote the map $R\rightarrow
R,\ x\mapsto rx$. This map $L_r$ is an endomorphism of the $\mathbb{Z}$-module $R$, and thus belongs to $\operatorname{End} R$. (For evident reasons, $L_r$ is known as the "left multiplication by $r$".)
(c) We let $L_R$ denote the map $R\rightarrow\operatorname{End} 
R,\ r\mapsto L_r$. (This map $L_R$ is known as the "left regular action"
  of $R$.)
Proposition 7. Let $R$ be a nonunital ring. Then, the map $L_R 
:R\rightarrow\operatorname{End} R$ is a nonunital ring homomorphism.

Proof of Proposition 7. This is well-known and completely straightforward
(just check that $L_R$ is $\mathbb{Z}$-linear and preserves products).
$\blacksquare$
Note that if $R$ is a unital ring, then the map $L_R :R\rightarrow
\operatorname{End} R$ is injective.
Now, we can generalize Corollary 6 to nonunital rings:

Corollary 8. Let $R$ be a nonunital ring. Let $e\in R$ be idempotent. Let $n\in\mathbb{N}$. Assume that $\left(  n+1\right)  e$ is a sum of $n$ pairwise commuting idempotents in $R$. Then, $\left(  n+1\right)  !e=0$.

Proof of Corollary 8. We have assumed that $\left(  n+1\right)  e$ is a sum of $n$ pairwise commuting idempotents in $R$. In other words, there exist $n$ pairwise commuting idempotents $e_1 ,e_2 ,\ldots,e_n $ such that $\left( n+1\right)  e=e_1 +e_2 +\cdots+e_n $. Consider these $e_1 ,e_2 
,\ldots,e_n $.
Consider the map $L_R :R\rightarrow\operatorname{End} R$. This map $L_R$ is
a nonunital ring homomorphism (by Proposition 7). Hence, the images
$L_R \left(  e_1 \right)  ,L_R \left(  e_2 \right)  ,\ldots,L_R \left(
e_n \right)  $ of the $n$ pairwise commuting idempotents $e_1, e_2, \ldots, e_n$ under $L_R$ must again be $n$ pairwise commuting idempotents.
For the same reason, the image $L_R \left( e \right)$ of the idempotent $e$ must again be an idempotent. Also, applying the map $L_R$ to both sides of
the equality $\left(  n+1\right) e = e_1 +e_2 +\cdots+e_n $, we obtain
\begin{equation}
L_R \left(  \left(  n+1\right)  e\right) = L_R \left(  e_1 +e_2 
+\cdots+e_n \right) = L_R \left(  e_1 \right)  +L_R \left(  e_2 \right)
+\cdots+L_R \left(  e_n \right)
\end{equation}
(since $L_R$ is a nonunital ring homomorphism). In view of $L_R \left(
\left(  n+1\right)  e\right)  =\left(  n+1\right)  L_R \left(  e\right)  $
(which holds since $L_R$ is a nonunital ring homomorphism), this rewrites as
\begin{equation}
\left(  n+1\right)  L_R \left(  e\right)  =L_R \left(  e_1 \right)
+L_R \left(  e_2 \right)  +\cdots+L_R \left(  e_n \right)  .
\end{equation}
Thus, $\left(  n+1\right)  L_R \left(  e\right)  $ is a sum of $n$ pairwise
commuting idempotents in $\operatorname{End} R$ (since $L_R \left(
e_1 \right)  ,L_R \left(  e_2 \right)  ,\ldots,L_R \left(  e_n \right)  $
are $n$ pairwise commuting idempotents in $\operatorname{End} R$). Hence,
Corollary 6 (applied to $\operatorname{End} R$ and $L_R \left(  e\right)  $
instead of $R$ and $e$) yields $\left(  n+1\right)  !L_R \left(  e\right)
=0$.
But $e$ is idempotent; thus, $e^2 = e$. The definition of $L_R$ yields
$\left(  L_R \left(  e\right)  \right)  \left(  e\right) = L_e \left(e\right) = ee = e^2 =e$. Now, applying the map $\left(  n+1\right)  !L_R \left(  e\right)  \in
\operatorname{End} R$ to the element $e\in R$, we find
\begin{equation}
\left(  \left(  n+1\right)  !L_R \left(  e\right)  \right)  \left(  e\right)
=\left(  n+1\right)  !\underbrace{\left(  L_R \left(  e\right)  \right)
\left(  e\right)  }_{=e}=\left(  n+1\right)  !e.
\end{equation}
Hence, $\left(  n+1\right)  !e=\underbrace{\left(  \left(  n+1\right)
!L_R \left(  e\right)  \right)  }_{=0}\left(  e\right)  =0\left(  e\right)
=0$. This proves Corollary 8. $\blacksquare$
We can now prove Theorem 1 at last:
Proof of Theorem 1. Let $x\in R$. We must prove that $\left(  n+1\right)
!x=0$.
We know that $x$ is a sum of $n$ pairwise commuting idempotents (since every
element of $R$ is a sum of $n$ pairwise commuting idempotents). In other
words, there exist $n$ pairwise commuting idempotents $e_1 ,e_2 
,\ldots,e_n $ such that $x=\sum_{i=1}^{n}e_i $. Consider these $e_1 
,e_2 ,\ldots,e_n $.
Let $i\in\left\{  1,2,\ldots,n\right\}  $. Then, $e_i \in R$ is an
idempotent. Moreover, $\left(  n+1\right)  e_i $ is a sum of $n$ pairwise
commuting idempotents in $R$ (since every element of $R$ is a sum of $n$
pairwise commuting idempotents). Hence, Corollary 8 (applied to $e=e_i $)
yields $\left(  n+1\right)  !e_i =0$.
Now, forget that we fixed $i$. We thus have shown that $\left(  n+1\right)
!e_i =0$ for each $i\in\left\{  1,2,\ldots,n\right\}  $. Summing up these
equalities over all $i\in\left\{  1,2,\ldots,n\right\}  $, we obtain
$\sum_{i=1}^{n}\left(  n+1\right)  !e_i =0$. Now,
\begin{equation}
\left(  n+1\right)  !\underbrace{x}_{=\sum_{i=1}^{n}e_i }=\left(  n+1\right)
!\sum_{i=1}^{n}e_i =\sum_{i=1}^{n}\left(  n+1\right)  !e_i =0.
\end{equation}
This proves Theorem 1. $\blacksquare$
See Rings in which each element is a sum of $n$ commuting idempotents for further developments about rings $R$ satisfying the conditions of Theorem 1.