Let $p(x)$ be a polynomial with integer coefficients and $k\geq 6$ a positive integer.
Given that $x_1,x_2,\ldots,x_k$ are distinct integers such $p(x_1),p(x_2),\ldots,p(x_{k})\in\{1,2,\ldots,k-1\}$, prove that $p(x_1)=p(x_2)=\cdots=p(x_k)$.
Not really sure how to proceed. It's obvious for degree $1$ and $2$ polynomials. I just want a hint. The condition $k \ge 6$ is rather mysterious.
I tried to do it by induction on $k$. Even the base case is not obvious, but lets suppose we demonstrated its true for $k=6$. If none of $p(x_1),...p(x_k)$ are equal to $k-1$, we are done since there are $k$ outputs in $\{1,..,k-2\}$, they are all equal by the inductive hypothesis.
If exactly one of the outputs is $k-1$, wlog it is $p(x_k)$ we still have $k-1$ outputs in the set $\{1,...,k-2\}$, and they are all equal to some number $a$, so we can write
$p(x)=a+q(x)(x-x_1)...(x-x_{k-1})$
Then $p(x_k)=a+q(x_k)(x_k-x_1)...(x_k-x_{k-1})=k-1$. But clearly
$k-2 \ge |a-(k-1)|=|q(x_k)(x_k-x_1)...(x_k-x_{k-1})| \ge 2^{k-3}$
a contradiction for $k \ge 5$. Maybe I was lazy with the bounding and I can get a contradiction for $k \ge 6$. I would be surprised if this is not where the condition comes from.
What if there is more than one output equal to $k-1$? I'm thinking about that.