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$

$w$ is a primitive $p$-th root of unity in $\mathbf C$ and its minimal polynomial is the cyclotomic polynomial
$$\Phi_p(X)=X^{p-1}+X^{p-2}+\dots+X+1. $$
As all minimal polynomial it generates the ideal $I(w)\subset\mathbf Q[X]$ of all polynomials which vanish at $w$. So there's a polynomial $Q(X)$ such that
$$F(X):=a_{p-1}X^{p-1}+a_{p-2}X^{p-2}+\dots+a_1X+a_0=Q(X)\Phi_p(X).$$
However, as $F(X)$ and $\Phi_p(X)$ have the same degree $p-1$, $Q(X)$ must be a constant $c$, so
$$a_{p-1}=a_{p-2}=\dots=a_1=a_0=c.$$
