If $d=\gcd\,(f(0),f(1),f(2),\cdots,f(n))$ then $d|f(x)$ for all $x \in \mathbb{Z}$ 
  
*
  
*$\textbf{Question.}$ Let $f$ be a polynomial of degree $n$ which takes only integral values. If $d=\gcd\,\{f(0),f(1),f(2),\cdots,f(n)\}$ then show that $d|f(x)$ for all $x \in \mathbb{Z}$.
  



*

*How can one show this. It's clear that if $f$ has degree $1$, then $f(x)=a_{0}+a_{1}x$. Clearly we have $d|a_{0}$ and $d|a_{0}+a_{1}$ so we have $d\mid a_{1}$, this says $d\mid f(x)$ for all $x \in\mathbb{Z}$. So if $f$ has degree $1$, then I am able to prove the question.

*Now if I take a polynomial of degree $2$, says $f(x) = ax^{2}+bx+C$ then I get the following. $d|c$, $d|a+b+c$ and $d|4a+2b+c$. So we get $d|a+b$ which says $d|2a+2b$ which along with $d|4a+2b$ gives $d|2a$. Similarly $d|2b$.  I am done if I am able to show $d|a$ and $d|b$ but I am not able to deduce that. 
An elaborate solution would be helpful.
 A: Note that $d$ divides $\gcd(f_0,f_1,f_2)$ iff $d$ divides $f_0,f_1,f_2$.
(I'm using $f_k=f(k)$ for simplicity.)
Using repeated differences we get
$$
\begin{array}{lll}
f_0 & f_1 & f_2 & \\
f_1-f_0 & f_2-f_1 \\
f_2-2f_1+f_0 \\
0 \\
\end{array}
$$
Newton's interpolation formula then gives us
$$
f(n) = f_0 \binom{n}{0} + (f_1-f_0) \binom{n}{1} + (f_2-2f_1+f_0) \binom{n}{2}
$$
Therefore, if $d$ divides $f_0, f_1, f_2$, then $d$ divides $f(n)$ for all $n$.
(And conversely, of course.)
In the general case,
$$
f(n) = d_0 \binom{n}{0} + d_1 \binom{n}{1} + d_2 \binom{n}{2} +  d_3 \binom{n}{3} +\cdots
$$
where $d_i$ are the numbers in the first column of the repeated differences array. It is clear that the $d_i$ are integer linear combinations of the $f_i$  and so if $d$ divides all $f_i$ then $d$ divides all $d_i$ and so all $f(n)$.
BTW, Newton's interpolation formula also proves that a polynomial takes integral values at integers iff it is an integer linear combinations of the binomial polynomials. See Integer-valued polynomial.
A: Sorry to revive a post from 2016. Ihf's accepted answer is lovely! I'd like to provide another approach to the problem, which is more elementary in my opinion.
We proceed to prove the claim by induction on the degree $n$. The base case $n=1$ has been handled already in the original post, so I will focus on the inductive step.
Suppose the claim is true for all polynomials of degree $\leq n-1$. Consider a degree $n$ polynomial $f(x)$ and let $d=\gcd(f(0), f(1), ..., f(n))$. We want to prove that $d\mid f(k)$ for each integer $k$. Let $g(x)=f(x+1)-f(x)$. Then $g(x)$ is a polynomial and it has degree $n'\leq n-1$. Let $e = \gcd(g(0), g(1), ..., g(n'))$. By the inductive hypothesis, $e$ divides $g(k)$ for each integer $k$.
Now, observe that $d$ divides $f(j)$ for $0\leq j\leq n$, which in particular implies that $d$ divides $g(j)=f(j+1)-f(j)$ for $0\leq j\leq n'$. Since $e$ is the greatest common divisor of $g(0), g(1), ..., g(n')$, it follows that $d$ divides $e$. Since $d$ divides $e$, and $e$ divides $g(k)$, we conclude that $d$ also divides $g(k)=f(k+1)-f(k)$ for each integer $k$.
Now, since $d$ divides $f(n)$, and $d$ divides $g(n)=f(n+1)-f(n)$, it follows that $d$ divides $f(n+1)$. Similarly, since $d$ divides $f(n+1)$ and $g(n+1)=f(n+2)-f(n+1)$, it follows that $d$ divides $f(n+2)$, and we continue in this fashion indefinitely. Thus, $d$ divides $f(m)$ for each positive integer $m$. Similarly, since $d$ divides $f(0)$ and $g(-1) = f(0)-f(-1)$, we get that $d$ divides $f(-1)$. Continuing in this way, since $d$ divides $g(-2)=f(-1)-f(-2)$, we get that $d$ also divides $f(-2)$, and etc. Thus, $d$ divides $f(k)$ for each integer $k$, and the proof is complete.
A: Hint: You're doing pretty well. But so far, you've worked with the assumption that $d$ divides $f(0), f(1), f(2)$ in the quadratic case. But what's given is that it divides the gcd of these items. 
You've never used the "gcd" part. 
You might want to think about that a little while in hopes of getting the quadratic case to work out, at which point the more general case may seem more obvious. 
(Yes, I know you asked for a completely elaborated solution, but I've chosen only to write this hint.)
