Polynomial Algebra~ Advanced This is a problem I have faced great difficulty with. (teacher's challenge question)
Suppose $G(n)$ is a monic polynomial with integer coefficients in which $G(0)=31$. Also, suppose that the distinct integers $b_1,...,b_q$ satisfy $G(b_1)=...=G(b_q)=65$
1) Find the maximum possible value of $q$ (over all $G$)
I got that $q=4$ since the maximum number of terms that can multiplied together to give $-34$($31-65$) is 4.
2) Determine all G for which this maximum is achieved ($q=4$)
I am not quite sure how to approach this problem, please help I am really frustrated and this is really important for me to be able to solve! (I have a test and I should be able to do questions similar to these...)
P.S. I didn't put up my work for question 1 because that's not what I am really concerned about. My central question is number 2.
 A: If $P(n)=G(n)-65$ then $P(b_1)=...=P(b_q)=65-65=0$, and
$P$ is monic just like $G$ is.
($G(n)$ cannot be a constant polynomial since $G(0)=31\not=65$.
Hence $\deg(G)=\deg(P)\ge1$.) 
Hence $P(n)=(n-b_1)^{a_1}(n-b_2)^{a_2}...(n-b_q)^{a_q}$ and
$G(n)=P(n)+65=(n-b_1)^{a_1}(n-b_2)^{a_2}...(n-b_q)^{a_q}+65$
for some positive integers $a_1,a_2,...,a_q$. 
Then $31=G(0)=(-b_1)^{a_1}(-b_2)^{a_2}...(-b_q)^{a_q}+65$,
hence 
$(-b_1)^{a_1}(-b_2)^{a_2}...(-b_q)^{a_q}=31-65=-34$. 
Now you would like to factor $-34$ into distinct integers,
as many as possible.
One option is $-34=1\cdot(-1)\cdot2\cdot17$, and
another is $-34=1\cdot(-1)\cdot(-2)\cdot(-17)$. 
This gives two possibilities for $G(n)$. One of them is when
$(-b_1)(-b_2)(-b_3)(-b_4)=-34=1\cdot(-1)\cdot2\cdot17$, then
$G(n)=(n-b_1)(n-b_2)(n-b_3)(n-b_4)+65=$
$=(n-1)(n+1)(n-2)(n-17)+65=$
$=n^4-19n^3+33n^2+19n+31$. Here $q=4$. 
The other possibility is when
$(-b_1)(-b_2)(-b_3)(-b_4)=-34=1\cdot(-1)\cdot(-2)\cdot(-17)$, then
$G(n)=(n-b_1)(n-b_2)(n-b_3)(n-b_4)+65=$
$=(n-1)(n+1)(n+2)(n+17)+65=$
$=n^4+19n^3+33n^2-19n+31$. Here again $q=4$. 
