Solution (source code)

= Solution

\b[Eisenstein's criterion.] Let $f(X)=a_nX^n+\cdots+a_0\in\mathbb Z[X]$ be a nonconstant <primitive polynomial>. If a <prime number> $p$ satisfies $p\nmid a_n$, $p\mid a_j$ for $0\leq j<n$, and $p^2\nmid a_0$, then $f$ is an <irreducible polynomial> over $\mathbb Q$.

To prove the <Eisenstein criterion>, suppose a nontrivial factorization exists over $\mathbb Q$. <Gauss lemma for polynomials> gives $f=gh$ with $g,h\in\mathbb Z[X]$ of positive degree. Their leading coefficients are not divisible by $p$, because their product is $a_n$. Reduction modulo $p$ therefore preserves both degrees, and
$$
\overline g\,\overline h=\overline{a_n}X^n\quad\text{in }\mathbb F_p[X].
$$
Since the only irreducible factor of the right side is $X$, both reduced factors are nonzero monomials of positive degree. Their constant coefficients are consequently divisible by $p$. This would make $p^2\mid g(0)h(0)=a_0$, a contradiction.

For the requested <polynomial>, shift the variable by one. The <binomial theorem> gives
$$
\Phi_p(X+1)=\frac{(X+1)^p-1}{X}=\sum_{j=1}^p\binom pjX^{j-1}.
$$
It is monic, all coefficients below the leading one are divisible by $p$, and the constant coefficient is $p$, not divisible by $p^2$. The <Eisenstein criterion> proves irreducibility of this shifted <polynomial>. The substitution $X\mapsto X+1$ is an <automorphism> of $\mathbb Q[X]$, with inverse $X\mapsto X-1$, so it preserves nontrivial factorizations. Hence
$$
\boxed{X^{p-1}+X^{p-2}+\cdots+1\text{ is irreducible over }\mathbb Q.}
$$
This is the <cyclotomic polynomial> for a prime index.