$(1+x+x^2)^n= a_0x +a_1x+\dots+a_{2n}x^{2n}$
I need to find :$(a_0+a_1+a_3+a_4+a_5+a_7....)/(a_2+a_5+a_8... )$ The trouble is the coefecient in the numerator and denominator are randomly distributed and i am not able to find a way to generate exact pattern from the $(1+x+x^2)^n$. Any hints to the question is appreciated.
Hint: Let $\omega = e^{i\frac{2\pi}{3}}$, then $\omega^2+\omega+ 1 = 0$ and $\omega^3 = 1.$ \begin{equation} 0 = f(\omega) = \sum_{k=0}^{2n}a_kx^k = (a_0+a_3+a_6+\dots) + (a_1+a_4+a_7+\dots)\omega + (a_2+a_5+\dots)\omega^2 \end{equation} Now, do a similar substitution with $x = \omega^2$ and you should have enough to work with.