TITLE: If P(n) divides Q(n) for all integers n then does P(x) divides Q(x)?
QUESTION [5 upvotes]: Let $S = \{ f \in \mathbb{Q}[x]\mid f(n) \in \mathbb{Z}, \forall n \in \mathbb{Z} \}$. 
Let  $P(x), Q(x) \in S $ be polynomials such that for every $ n \in \mathbb{Z}$ either $\frac{Q(n)}{P(n)} \in \mathbb{Z}$  or both $P(n), Q(n)$ are $0$ . Can we conclude $\frac{Q(x)}{P(x)} \in S$ ?, or do we have a counter example?.
What if we work in $\mathbb{Z}[x]$?
[I know that a $\mathbb{Z}$-basis for $S$ is $x \choose i$ where $i \in \mathbb{Z}_{\geq 0}$.]

REPLY [8 votes]: Let $dQ(x)=P(x)A(x)+r(x)$ for some integer $d$, with $A$ and $r$ having integer coefficients, and degree of $r$ less than degree of $P$. Then $P(n)$ divides $r(n)$ for all $n$. But this is impossible unless $r$ is identically zero, since $P(n)$ grows faster than $r(n)$.