Let $R$ be a factorial ring and $f=\sum_{i=0}^n a_iX^i \in R[X]$ a primitive polynomial with degree > 0. Furthermore, let $p\in R$ be a prime element and $p\nmid a_n, \ \ p\mid a_i, \forall i<n, \ \ p^2\nmid a_0$. Then $f$ is irreducible in $R[X]$.
I will now do the proof as it is done in my book (Algebra - Siegfried Bosch, 8.ed. p67-68). The proof is indirect.
We assume $f$ is reducible in $R[X]$. We then have a decomposition $f=gh, g=\sum_{i=0}^r b_iX^i, h=\sum_{i=0}^sc_iX^i$, where $r+s=n, r>0, s>0$. It then follows that
$a_n=b_rc_s\ne 0, \ \ p\nmid b_r, \ \ p\nmid c_s, \\ a_0=b_0c_0, \ \ p\mid b_0c_0, \ \ p^2\nmid b_0c_0$
and we assume without loss of generality, that $p\mid b_0, p\nmid c_0$. Let then be $t<r$ maximal with $p\mid b_\tau$ for $0\le \tau \le t$. We set $b_i=0$ for $i>r$ and $c_i=0$ for $i>s$ and get $a_{t+1}=b_0c_{t+1} + ... + b_{t+1}c_0$.
We have $p\nmid a_{t+1}$, because $b_0c_{t+1},...,b_tc_1$ are divisable by $p$, but not $b_{t+1}c_0$. It follows that $t+1=n$, because of our requirements about $f$, and therefore $r=n,s=0$ in contradiction to $s>0$.
I understand the proof, but the point is, I can not see why the requirements $p^2\nmid a_0$ or that $f$ be primitive is needed. It has not been used.