Let $n$ be an integer $\ge2$.
(a) What is the least integer $k$ such that any $n$ by $n$ integer matrix is a $\mathbb Z$-linear combination of $k$ indempotents?
(The idempotents are also required to be $n$ by $n$ integer matrices.)
Denote the above integer $k$ by $k_n(\mathbb Z)$.
(b) Is the sequence $(k_n(\mathbb Z))$ bounded?
One can define $k_n(R)$ for any commutative ring $R$, and ask the same questions as above. One can then define $k_n$ as the largest of all the $k_n(R)$ (when $R$ runs over the class of all commutative rings).
If $R$ is a field, then the $k_n(R)$ have been computed in
Clément de Seguins Pazzis, On decomposing any matrix as a linear combination of three idempotents, Linear Algebra Appl. 433-4 (2010), 843-855, http://arxiv.org/abs/0907.4949.
Let $A=(a_{ij})_{1\le i,j\le n}$ be a family of indeterminates. In particular $A$ can be viewed as an $n$ by $n$ matrix with entries in the polynomial ring $$ S:=\mathbb Z[(a_{ij})_{1\le i,j\le n}]. $$ Then $k_n$ is also the least integer $k$ such that $A$ is an $S$-linear combination of $k$ indempotents.
We can ask about $k_n$ the same questions as we asked above about $k_n(\mathbb Z)$.
I haven't even been able to compute $k_2(\mathbb Z)$! The equality $$ \begin{pmatrix}a&b\\c&d\end{pmatrix}=(a-2)\begin{pmatrix}1&0\\0&0\end{pmatrix}+\begin{pmatrix}1&b\\0&0\end{pmatrix}+\begin{pmatrix}1&0\\c&0\end{pmatrix}+d\begin{pmatrix}0&0\\0&1\end{pmatrix} $$ implies $k_2(\mathbb Z)\le k_2\le4$, so that we get $$ 2\le k_2(\mathbb Z)\le k_2\le4. $$ I'll be happy to upvote any answer improving the above estimate for $k_2(\mathbb Z)$!
Ewan Delanoy asked a related question.
For a list of the MSE questions about linear combination of idempotents via Google, click here, or (if it doesn't work) paste the words
site:math.stackexchange.com "combination of idempotents" OR "combinations of idempotents"