$f(1)+f(-1)=0$ prove $f(x)$ does not divide $x^n -1$ 
Let $f(x)$ be an irreducible polynomial in $\Bbb Z[x]$ satisfying $f(1)+f(-1)=0$.  Prove that $f(x)$ does not divide $x^n-1$ for any positive integer $n$.

with $f(1)+f(-1)=0$ it means sum of all even terms is $0;$ how is that related to divisibility to $x^n -1$? I can't figure out and would appreciate any help. Thanks!
 A: We know that $X^n-1$ factorizes into irreducible polynomials in $\mathbb{Z}[X]$ as below $$X^n-1=\prod_{d\mid n}\Phi_d(X)$$
Where $\Phi_d(X)$ is the $d^{th}$ cyclotomic polynomial. Since $f$ is irreducible in $\mathbb{Z}[X]$ then
if we assume $f\mid X^n-1$ in $\mathbb{Z}[X]$ then it must be one of the irreducible cyclotomic polynomials since $\mathbb{Z}[X]$ is a $\mathrm{UFD}$. Let $f=\Phi_d$ for some $d\mid n$. Then we need to prove that $\Phi_d(1)+\Phi_d(-1)\neq0$ to reach a contradiction.
If $d=2^mr$ with $\gcd(2,r)=1$ and $m\geq2$, then $\Phi_d(X)=\Phi_{2r}(X^{2^{m-1}})$. Hence in this case $\Phi_d(1)=\Phi_d(-1)$ and therefore the equation $\Phi_d(1)+\Phi_d(-1)=0$ would imply $\Phi_d(1)=0$ but this is a contradiction since $1$ is not a root of $\Phi_d(X)$.
If $d=p^k$ for some prime $p$ then $$\Phi_d(X)=\sum_{i=0}^{p-1}X^{ip^{k-1}}$$
Then in this case one can easily verify that $\Phi_d(1)+\Phi_d(-1)\neq0$.
If $d$ is not a power of a prime then it's well known that $\Phi_d(1)=1$. Then the equation $\Phi_d(1)+\Phi_d(-1)=0$ would imply $\Phi_d(-1)=-1$.
We are left with two cases $d=2k$ with $\gcd(2,k)=1$ and $d$ odd and not a power of a prime. For the first case we know that $\Phi_d(X)=\Phi_k(-X)$. Hence $$-1=\Phi_d(-1)=\Phi_k(1)$$ A contradiction since $\Phi_k(1)$ is either $1$ when $k$ is not a power of a prime or $q$ when $r=q^l$ for a prime $q$.
For the last case, when $d$ is odd, we have $\Phi_{2d}(1)=\Phi_d(-1)=-1$. Again a contradiction as we observed before.
We are done!
In this proof we have used lots of properties of a cyclotomic polynomial. For reference check this link https://en.m.wikipedia.org/wiki/Cyclotomic_polynomial
