I am trying to solve the following exercise in Artin, without breaking into cases for even and odd $k$.
A square matrix $A$ is called nilpotent if $A^k = 0$ for some $k > 0$. Prove that if $A$ is nilpotent, then $I + A$ is invertible.
Here's my attempt.
I claim that the inverse of $I + A$ is $$(I + A)^{-1} = \sum\limits_{n=0}^{k-1} (-1)^n A^n.$$ We prove this is a right inverse. \begin{align*} (I + A)\sum\limits_{n=0}^{k-1} (-1)^n A^n & = \sum\limits_{n=0}^{k-1} (-1)^n (I + A)A^n \\ & = \sum\limits_{n=0}^{k-1} (-1)^n (A^n + A^{n+1}) \end{align*} If $n$ is even, then $n + 1$ is odd and vice-versa. Hence, the series telescopes: \begin{align*} & = (A^0 + A^{1}) - (A^1 + A^2) + (A^2 + A^3) + \ldots \pm (A^{k-1} + A^k) \\ & = I \pm A^k \\ & = I \end{align*} It seems that the sign of the final term is dependent on whether $k$ is even or odd. However, it shouldn't matter, because if $A^k = 0$, then $-A^k = 0$.
Is there a better way to formalize this fact?
What you did is basically the factorization $x^n - y^n$ for commuting $x,y$ in the same ring $R$, which you can prove using induction. And obviously the two matrices commute since $I$ commutes with every matrix.
To formalize this, you can just claim that $I = I^k = I^k - O = I^k - (-A)^k$ can be factored in such way, so that the second factor $B$ satisfies $(I+A)B = I$, as desired.
For instance, $x^n - y^n = (x-y)\left(\sum\limits_{i=0}^{n-1} x^i y^{n-i-1}\right)$. Holds for $n=2$ (direct proof); suppose it holds for an arbitrary $n\geq 2$. Then $$ x^{n+1} - y^{n+1} = (x+y)(x^n-y^n)- xy(x^{n-1} - y^{n-1}).$$ So you know how to proceed.