Prove $a_0=a_1=\dots =a_{p-1}$ If $w=\cos \frac{2\pi}{p}+i\sin \frac{2\pi}{p}$ and $p$ is a prime and $a_0,a_1,\dots ,a_{p-1}$ are non zero integers and $a_{p-1}w^{p-1}+\dots +a_1w+a_0=0$ Prove $a_0=a_1=\dots =a_{p-1}$
I got a solution somewhere but don't know how it works:
"The thing is that $\Phi_p (X)$ is irreducible (except for 2 cuz parity) and it divides $P(X)=\sum\limits_{i=0}^{p-1} a_iX^i$

$\mathbb Z[x]$ is the ring of polynomials with integer co-efficients. Definition: Any $f(x)\in Z[x]$ is irreducible in $Z[x]$ iff whenever $g(x), h(x)\in \mathbb Z[x]$ and $f(x)=g(x)h(x)$ then at least one of $g(x),h(x)$ is a constant.
$(\bullet)$. Let $f(x)\in \mathbb Z[x]$ be irreducible in $Z[x]$ with deg$(f(x))>0$ and let  $z\in \mathbb C$ satisfy $f(z)=0.$ If $0\ne g(x)\in \mathbb Z[x]$ and $g(z)=0$ then $g(x)=f(x)h(x)$ for some $h(x)\in \mathbb Z[x].$
Theorem. (Eisenstein). If $f(x)=\sum_{j=0}^n A_jx^j\in \mathbb Z[x]$ with $n\geq 1$, and if  $p$ is a prime number  such that...... (i) $p$ does not divide $A_n,$ and (ii) $p$ divides $A_j$ for $0\leq j\leq n-1,$ and (iii) $p^2$ does not divide $A_0,$...... then $f(x)$ is irreducible in $\mathbb Z[x].$ This is usually called Eisenstein's Criterion:  A sufficient (but not necessary) condition for $f(x)\in \mathbb Z[x]$ to be irreducible in $\mathbb Z[x].$ 
With $p$ prime and $w=\cos (2\pi /p) +i \sin (2\pi /p)$ we have $0=w^p-1=(w-1)f_p(w),$  where $$f_p(x)=\sum_{j=0}^{p-1}x^j$$ and $w\ne 1$ so $f_p(w)=0.$
For $x\ne 1$ let $x=y+1$ and we  have $$f_p(x)=\frac {x^p-1}{x-1} =\frac {(y+1)^p-1}{y}= \sum_{j=0}^{p-1}\binom {p}{j+1}y^j= k_p(y).$$
Now $p$ is prime so $\binom {p}{j+1}$ is divisible by $p$ for  $0\leq j\leq p-2.$ And $\binom {p}{p}=1$ while $\binom {p}{1}=p$ is not divisible by $p^2.$ So $k_p(x)$ meets Eisenstein's Criterion: $k_p(y)$ is irreducible in $Z[y].$
Therefore $f_p(x)$ is irreducible in $\mathbb Z[x].$ 
Because if $f_p(x)=g(x)h(x)$ with $g(x),h(x)\in \mathbb Z[x]$ then  $k_p(y)=f_p(x-1)=g(x-1)h(x-1)=g(y)h(y)$ so at least one of $g(y),h(y)$ is constant.
Finally, if $g_p(x)=\sum_{j=0}^{p-1} a_jx^j\in \mathbb Z[x]$ and not all $a_j$ are $0,$ and if $g_p(w)=0$ then  by $(\bullet)$ there exists $h(x)\in \mathbb Z[x]$ such that $g_p(x)=h(x)f_p(x).$ This implies $$p-1\geq \deg (g_p(x))=\deg (h(x))+\deg (f_p(x))=\deg (h(x))+p-1$$ so $h(x)$ is a constant: $h(x)= K. $ Then $a_j=K$ for $0\leq j\leq p-1.$
Remark. I have employed a typical abuse of notation, using $f(x), k_p(y),$ etc., to denote  functions and using $f(z),f(w),$ etc., to denote numbers.
