TITLE: Integer-valued polynomials divisible by 2 or 3
QUESTION [5 upvotes]: I would like some help with the following problem:

Suppose that $p \in \operatorname{Int}(\mathbb{Z}) = \{p \in \mathbb{Q}[X] : p(\mathbb{Z}) \subseteq \mathbb{Z}\}$ is such that for all $z \in \mathbb{Z}$, either $2$ divides $p(z)$ or $3$ divides $p(z)$.
Show that the quantifiers may be reversed, i.e., that either for all $z \in \mathbb{Z}$ we have $2$ divides $p(z)$, or for all $z \in \mathbb{Z}$ we have $3$ divides $p(z)$.

I thought of using the fact that $\{\binom{X}{k} \mid k \in \mathbb{N}\}$ is a $\mathbb{Z}$-basis of $\operatorname{Int}(\mathbb{Z})$, where $$\binom{X}{k} = \frac{X (X - 1) \cdots (X - k + 1)}{k!}$$ (in particular $\binom{X}{0} = 1$).
Therefore, for a fixed $p \in \operatorname{Int}(\mathbb{Z})$, I can write $$p = \sum_{i=1}^k a_i \binom{X}{i}$$
for some $k \in \mathbb{N}$ and $a_1, \ldots, a_k \in \mathbb{Z}$.
I tried to show the contrapositive:
suppose that there is $z_2, z_3 \in \mathbb{Z}$ such that $2 \nmid p(z_2)$ and $3 \nmid p(z_3)$.
Then there is $1 \leq i, j \leq k$ such that $2 \nmid a_i$ and $3 \nmid a_j$.
But then I don't quite know how to find a $z$ with both $2 \nmid p(z)$ and $3 \nmid p(z)$,
just as I don't see how "for all $z \in \mathbb{Z}$, either $2$ divides $p(z)$ or $3$ divides $p(z)$" relates to the coefficients of $p(z)$.
Is my approach correct, and how should I proceed?

REPLY [3 votes]: Let $f$ denote the polynomial $p$ in OP, $r,s\in\Bbb N$ and $u\in\Bbb Z\setminus\{0\}$ such that $2\nmid u$, $3\nmid u$ and $g=2^r3^suf$ is a polynomial with integer coefficients.
Assume that there exists $a,b\in\Bbb Z$ such that $2\nmid f(a)$  and $3\nmid f(b)$.
By chinese remainder theorem, there exists $c\in\Bbb Z$ such that
\begin{align}
c&\equiv a\pmod{2^{r+1}}&
c&\equiv b\pmod{3^{s+1}}
\end{align}
hence
\begin{align}
g(c)&\equiv g(a)\not\equiv 0\pmod{2^{r+1}}&
g(c)&\equiv g(b)\not\equiv 0\pmod{3^{s+1}}
\end{align}
consequently, $2\nmid f(c)$ and $3\nmid f(c)$ - a contradiction.