Q:

Irreducibility of $x^{n-1} + \cdots + x + 1$ over $\Bbb Q$ (or $\Bbb Z$), when $n$ is odd

Consider the polynomial $p(x) = x^{n-1} + \cdots + x + 1 \in \Bbb Q[x]$, $n \in \Bbb N_{\gt 1}$.
By Eisenstein Criterion, one can see that if $n$ is prime, $p(x)$ is irreducible over $\Bbb Q$.
If $n$ is even, $-1$ is always a root of $p(x)$, so $p(x)$ is not irreducible.
Now, if $n$ is odd, non prime, is it possible that $p(x)$ is irreducible ?
The first case is $n = 9$, so I don't know how I can answer this question.

A:

If $n$ is odd and nonprime, then
$$p_n(x)=1+x+x^2 + \dots + x^{n-1} = \frac{x^n-1}{x-1}$$
is never irreducible.
To see this, write $n=ab$ with $a,b \ge 3$. Then
$$(x-1)p_n(x) = x^n-1= x^{ab}-1=(x^a)^b-1 = (x^a-1)p_b(x^a) = (x-1)p_a(x)p_b(x^a)$$
so that
$$p_n(x)=p_a(x)p_b(x^a)$$
is a nontrivial factorization of $p_n(x)$.

