Proof writing for polynomials Let the polynomial  $f(x)=x^n+a_1 x^{n-1}+a_2 x^{n-2}+.....a_{n-1}x+a_n$ have integral coefficients. If there exists four distinct integers $a,b,c$ and $d$ such that $f(a)=f(b)=f(c)=f(d)=5$ show that there is no integer $k$ such that $f(k)=8$
I have tried to prove it but I somehow feel that my proof is incorrect please point out the errors and suggest some other way to do the question.
This how I proceeded 
$\frac{x^{n+1}-1}{x-1}=x^n+a_1 x^{n-1}+a_2 x^{n-2}+.....a_{n-1}x+a_n $
$\frac{a^{n+1}-1}{a-1}=5$
 hence $\frac{a^{n+1}-1}{5}=a-1$ 
Since $a$ is an integer $a-1$ will also be an integer hence $5|a^{n+1}-1$
Using fermat's little theorem we know that $a^4-1\equiv_5 0$ 
Since $f(a)=5$ we get $n+1=4$
Let k be an integer such that $f(k)=8$
$\frac{a^4-1}{8}=a-1$ Since  $a-1$ is an integer $8|a^4-1$ 
We will consider two cases 


*

*when $a$ is an even integer

*when $ a$ is an odd integer


If $a$ is even then $a^4-1$ will be odd and it not be divisible by $8$
If $a$ is odd then it will be relatively  prime to $8$ hence $8$ will be Carmichael number
$a^7-1\equiv0(mod8)$  which proves that $a^4-1$ is not divisible by 8.
$\therefore$ there  is no integer k such that $f(k)=8$ 
 A: Hint: show that if $f(a) = f(b) = f(c) = f(d) = 5$, then 
$$f(x) = 5 + (x-a)(x-b)(x-c)(x-d) g(x)$$ 
for some polynomial $g$ with integer coefficients. If $f(e) = 8$, then 
$$(e-a)(e-b)(e-c)(e-d) g(e) = 3,$$
but a product of four distinct integers can't be a divisor of $3$.
A: I think the first part of your solution is wrong ($\frac{x^{n+1}-1}{x-1}=x^n+x^{n-1}+\cdots+x+1$, not $x_n+a_1x^{n-1}+\cdots+a_{n-1}x+a_n$).
Since $f$ is a polynomial with integer coefficients, we have $a-b|f(a)-f(b)$ for all $a, b\in \mathbb{Z}, a\neq b$. Thus if we suppose there exists integer $k$ with $f(k)=8$, we have $k-x|f(k)-f(x)=3$, where $x=a,b,c,d$. Since $a,b,c,d$ are all distinct we have $\{a,b,c,d\}=\{k-3,k-1,k+1,k+3\}$.
Then, consider $g(x)=f(x-k)-5$. $g$ clearly is a monic polynomial with integer coefficients such that $g(0)=3, g(-3)=g(-1)=g(1)=g(3)=0$. If we set $g(x)=x^n+b_1x^{n-1}+\cdots+b_{n-1}x+b_n$, by conditions we have $b_n=3$ and following:
$3^n+3^{n-1}b_1+\cdots+3b_{n-1}+3=0 \rightarrow 3^{n-1}+3^{n-2}b_1+\cdots+b_{n-1}+1=0$
$(-3)^n+(-3)^{n-1}b_1+\cdots+(-3)b_{n-1}+3=0 \rightarrow (-3)^{n-1}+(-3)^{n-2}b_1+\cdots+b_{n-1}-1=0$
From the first equation we have $b_{n-1}\equiv-1 \mod 3$, while from the second equation we have $b_{n-1}\equiv 1 \mod 3$, a contradiction. Thus there exists no such $f$.
