How to prove that $f(x)=\prod_{i=1}^{18}(x-i)+23$ is irreduciblein $\Bbb Q$?
Suppose not, then $f(x)=g(x)h(x)$, where $g(x),h(x)\in\Bbb Z[x], 1\leq \deg g\leq \deg h<=17$. Then we have $23=f(i)=g(i)h(i), i=1,\cdots,18$. So $g(i)=\pm 1, h(i)=\pm 23$ or $g(i)=\pm 23, h(i)=\pm 1$. There are four choices for $(g(i),h(i))\in \{(1,23),(-1,-23),(23,1),(-23,-1)\}$. So there is one choice appeared at least $5$ times. Suppose $g(x)=p(x)(x-a_1)\cdots (x-a_5)+m$, $m\in \{1,23,-1,-23\}$. Then how to do?
Note that $24=(-1)\cdot 1\cdot 2\cdot 3\cdot 4$ is $5$ natural numbers product.
The crucial ingredient in the proof is the OP observation that one possibility occurs at least $5$ times, by the pigeonhole principle.
Let $(23,1)$ occur exactly $k\ge 5$ times. Then $g(x)=p(x)(x-a_1)\ldots (x-a_k)+23.$ For any $j\in\{b_1,\ldots, b_{13}\}=\{1,2,\ldots, 18\}\setminus \{a_1,\ldots, a_k\}$ we have $$g(j)=p(j)(j-a_1)\ldots (j-a_k)+23$$ The choices $g(j)=1,23,-23$ are impossible, Hence $g(j)=-1$ for $j\in\{b_1,\ldots, b_{13}\}.$ Moreover $k=5$ as the number $24$ can be represented as a product of at most $5$ different factors. We thus get $$g(x)=s(x)(x-b_1)\ldots (x-b_{13})-1$$ Substituting $x=a_1$ gives $$23=g(a_1)=s(a_1)(a_1-b_1)\ldots (a_1-b_{13})-1$$ which leads to a contradiction.