For $z_1, z_2, \ldots, z_{2021}$ the roots of $z^{2021}+z-1$, evaluate $\sum_i\frac{z_i^3}{z_i+1}$ 
Let $z_1$, $z_2$, $\ldots$, $z_{2021}$ be the roots of the polynomial $z^{2021}+z-1$. Evaluate
$$\frac{z_1^3}{z_1+1} +\frac{z_2^3}{z_2+1} +\frac{z_3^3}{z_3+1} +\cdots +\frac{z_{2021}^3}{z_{2021}+1} $$

I'm not really sure where to go from here, I saw how the polynomial factors:
$$(z^2 - z + 1)  (z^{n-2} + z^{n-3} - z^{n-5}  - z^{n-6} + z^{n-8} - \cdots + z^2 - 1)$$

This can be done using residues and the function
$$f(z) = \frac{z^3}{z+1} \frac{q(1-z)/z+1}{z^q+z-1}
= \frac{z^2}{z+1} \frac{q+(1-q)z}{z^q+z-1}.$$
where $q\ge 4,$ an integer.
First we need to show that the poles from the term in $q$ are all simple.
We write for a pole $\rho$ the Taylor series of $g(z) = z^q+z-1$
$$g(z) = g(\rho) + g'(\rho) (z-\rho) + \cdots$$
We have $g(\rho) = 0$ and
$$g'(\rho) = q \rho^{q-1} + 1 = q \frac{1-\rho}{\rho} + 1
= \frac{q}{\rho} - q + 1$$
Supposing this were zero we would have
$$\rho = \frac{q}{q-1}.$$
Keeping in mind that $g(\rho) = 0$ this yields
$$\frac{q^q}{(q-1)^q} + \frac{q}{q-1} - 1 = 0
\quad\text{or}\quad
\frac{q^q}{(q-1)^{q-1}} = -1.$$
This is clearly impossible with $q\ge 4$ a positive integer
and hence $g'(\rho) \ne 0$ and the poles are simple.
Note also that $-1$ is not a root of $z^q+z-1$ by inspection.
Observe that with $\rho$ the finite poles other than minus one we have
(note that there is in fact no pole at zero)
$$\sum_\rho \mathrm{Res}_{z=\rho} f(z)
= \sum_\rho \frac{\rho^3}{\rho+1}
(q(1-\rho)/\rho + 1)
\lim_{z\rightarrow \rho}
\frac{z-\rho}{z^q+z-1-(\rho^q+\rho-1)}
\\ = \sum_\rho \frac{\rho^3}{\rho+1}
(q(1-\rho)/\rho + 1) \frac{1}{q\rho^{q-1} + 1}
= \sum_\rho \frac{\rho^3}{\rho+1}.$$
Now residues sum to zero so our sum must be the residue at $-1$
with the sign flipped. The residue at infinity is zero by
inspection when $q\ge 4.$ We get
$$- \mathrm{Res}_{z=-1} f(z)
= - (-1)^3 \frac{1-2q}{(-1)^q-2}$$
for an end result of
$$\bbox[5px,border:2px solid #00A000]{
\frac{2q-1}{2-(-1)^q}.}$$
In particular with $q$ being the current year $2021$ we find
the value
$$1347.$$
