Solution:
We claim that the only such polynomials are of the form P(x)=i1(x+j) for some integers i=0,j.
Let R be the set {P(n)∣n∈Z}.
Without loss of generality, we may assume that the leading coefficient of P(x) is positive; otherwise we can consider −P(x). If the polynomial P(x) has even degree, then it must have a minimum value m. Then all integers less than m are in the set Z\R, so it cannot be finite. Thus P(x) must have odd degree.
Since the set Z\R is finite, there exists some M1 such that x∈R for all integers x>M1. As P(x) has odd degree and positive leading coefficient, there exists some M2 such that P(M2)>M1, P(x)≤P(M2) for all x≤M2 and P(x) is increasing on [M2,∞). Let M=max{M1,M2}.
Choose an integer n such that n>M and P(n+1)>P(n)+1. Letting s=⌊P(n)+1⌋, we claim there is no such integer x such that P(x)=s. Consider the following cases:
- x≤M2. Then P(x)≤P(M2)≤P(n)<s.
- M2<x≤n. Then P(x)≤P(n)<s as P(x) is increasing.
- x>n. Then x≥n+1 and P(x)≥P(n+1)>P(n)+1≥s, as P(x) is increasing.
Thus s is in the set Z\R. However, s>P(n)>P(M2)>M1, contradicting the definition of M1. Thus, P(n+1)≤P(n)+1 for all integers n>M.
Let d be the degree of P(x). Observe P(n+1)−P(n) is a polynomial of degree d−1 with the same positive leading coefficient as P(x). If d−1≥1, then P(n+1)−P(n) will become arbitrarily large as n increases, contradicting P(n+1)≤P(n)+1 for all integers n>M.
Therefore, d=1, and P(x)=ax+b for some real numbers a=0 and b. As Z\R is finite, only finitely many pairs of integers (t,t+1) are not in R. Thus, there exists distinct integers n1 and n2 such that P(n1)=t and P(n2)=t+1. It follows that
1=P(n2)−P(n1)=a(n2−n1)⟹a=n2−n11=i1
for some integer i=0. Furthermore,
P(n1)=t=an1+b⟹b=iit−n1=ij
for some integer j. Hence P(x) must be of the form i1(x+j) for integers i=0,j. All such polynomials clearly satisfy the given conditions.