For every positive integer $n\ge 3$, let $\phi_n$ be the set of all positive integers less than and coprime to $n$. Consider the polynomial:
$$P_n(x)=\sum_{k\in\phi_n} {x^{k-1}}.$$

a. Prove that $P_n(x)=(x^{r_n}+1)Q_n(x)$ for some positive integer $r_n$ and polynomial $Q_n(x)\in\mathbb{Z}[x]$ (not necessary non-constant polynomial).
b. Find all $n$ such that $P_n(x)$ is irreducible over $\mathbb{Z}[x]$.