<s>[INST] A smarter (not bashy) way to solve this roots of unity problem? (Mandelbrot) Let $\xi = \cos \frac{2\pi}{5} + i \sin \frac{2pi}{5}$ be a complex fifth root of unity. Set $a = 20\xi^2 + 13 \xi, b = 20\xi^4 + 13\xi^2, c = 20\xi^3 + 13\xi^4, \text{and } d = 20\xi + 13\xi^3$. Find $a^3 + b^3 + c^3 + d^3$
Immediately what comes to mind is finding $(a + b + c + d)^3$ and subtracting whatever we don't need to get $a^3 + b^3 + c^3 + d^3$. However,
\begin{equation*}
(a+b+c+d)^3 = a^3+3a^2b+3a^2c+3a^2d+3ab^2+6abc+6abd+3ac^2+6acd+3ad^2+b^3+3b^2c+3b^2d+3bc^2+6bcd+3bd^2 + c^3 + 3c^2d + 3cd^2 + d^3
\end{equation*}
There is simply no good way to calculate $6abc + 6abd + 6acd + 6bcd $ without expanding everything.
 [/INST] They simplified exponents when defining $\xi,$ but you could also write the equations
$$\begin{align*}a &= \xi(20\xi+13),\\b &= \xi^2(20\xi^2+13),\\c &= \xi^3(20\xi^3+13),\\d &= \xi^4(20\xi^4+13)\end{align*}$$
(actually, they swapped $c$ and $d$, but that doesn't change the problem). Consider the polynomial
$$f(x) = [x(20x+13)]^3 = 20^3x^6+3\cdot20^2\cdot13x^5+3\cdot20\cdot13^2x^4+13^3x^3.$$
A roots of unity filter* using fifth roots of unity would give the sum of the coefficients of $x^0, x^5, x^{10},$ etc., which is just $3\cdot20^2\cdot 13 = 15600.$ But $\xi$ is a fifth root of unity! So,
$$15600 = \frac{f(1)+f(\xi)+f(\xi^2)+f(\xi^3)+f(\xi^4)}{5} = \frac{33^3+a^3+b^3+c^3+d^3}{5}.$$
Rearranging gives
$$a^3+b^3+c^3+d^3=78000-33^3=\boxed{42063}.$$

*Say we have some polynomial
$$P(x) = a_0x^0+a_1x^1+a_2x^2+\cdots+a_nx^n$$
Plugging in powers of the $k$th root of unity $\omega$ gives
$$\sum_{j=0}^{k-1}P(\omega^j) = \sum_{i=0}^n a_i\sum_{j=0}^{k-1}(\omega^{j})^i.$$
Inspecting the inner summand, we find
$$\sum_{j=0}^{k-1}(\omega^i)^j = k$$
if $\omega^i = 1$ (i.e. $i$ is a multiple of $k$), otherwise
$$(\omega^i-1)\sum_{j=0}(\omega^i)^j = (\omega^{i})^k-1 = 0,$$
so it evaluates to zero.
</s>