If $(1+x+x^2)^n = (p_0+p_1x+p_0x^2+p_3x^3+p_4x^4+\ldots++p_nx^n)$ then prove that $p_1+p4+p7 + \ldots = 3^{n-1}$ [duplicate]
Solution 1:
Let $f(x) = (1 + x + x^2)^n$, and let $g(x) = f(x)/x$.
- For 1, consider $g(1) + g(\omega) + g(\omega^2)$, where $\omega = e^{2 \pi i/3}$.
- For 2, consider $f(i) + f(-i)$.