We can simplify this by considering the cases when $k$ is even or odd.
If $k$ is even, then $k+1$ is odd, and $(-1)^{k+1} = -1$. So, the expression becomes $2-z(-1) = 2+z$.
If $k$ is odd, then $k+1$ is even, and $(-1)^{k+1} = 1$. So, the expression becomes
Show more…