Remember that if P0(X),P1(X),P2(X),… are monic polynomials with integer coefficients such that degPk(X)=k for all k=0,1,2,…, then any polynomial P(X) with integer coefficients can be written in a unique way as
P(X)=a0P0(X)+a1P1(X)+⋯+anPn(X),
where a0,a1,…,an are integers and an=0. This can be proved by induction on the degree of P(X) using the Euclidean algorithm.
Therefore, let us write our polynomial as:
P(x)=a0x(x−1)(x−2)(x−3)+a1x(x−1)(x−2)+a2x(x−1)+a3x+a4.
Since 0≤a4=P(0)<72, there are 72 possible choices for a4.
For any choice of a4, we have −a4≤a3=P(1)−a4<72−a4. Hence, we also have 72 possible choices for a3.
For each choice of a3 and a4 we have
−22a3+a4≤a2=2P(2)−2a3−a4<272−22a3+a4.
Hence, there are 36 possible choices for a2.
Keep doing that way, the total number of polynomials is
72×72×(72/2)×(72/6)×(72/24)=72×72×36×12×3=25922.