For $n\in\mathbb{N}$, can $X^{n}-1$ ever be written as $g\cdot h$ in $\mathbb{Z}[X]$ with $g$ and $h$ monic and non-constant polynomials with integer coefficients such that $a\cdot g+b \cdot h=1$ for suitable $a$ and $b$ in $\mathbb{Z}[X]$? (Clearly this is possible if we only ask $a, b \in \mathbb{Q}[X]$.)
Of course, $X^{n}-1$ factors as the product of the cyclotomic polynimials $\Phi_{d}$ taken over the divisors $d$ of $n$, so we must have $g=\prod_{d\in G}\Phi_{d}$ and $h=\prod_{d\in H}\Phi_{d}$ where $G$ and $H$ are disjoint, non-empty subsets of $D=\{d\in\mathbb{N}|d|n\}$ with $G\cup H=D$.
If $d\in G$ and $e\in H$ then in view of $a\cdot g+b\cdot h=1$ we find that $\Phi_{e}(\zeta_{d})$ must be a unit in $\mathbb{Z}[\zeta_{d}]$. In particular, if $1\in G$ then any prime power $e=p^{r}\in D$ must also be in $G$, as $\Phi_{e}(\zeta_{1})=\Phi_{e}(1)=p$ is not a unit.