Possibilities of a function value. I was working on a problem: "Find all the possible values of the integer $c$ such that there exists a polynomial $p(x) \in \mathbb{Z}[x]$ such that $p(8)=24$ and $p(c)=7.$ I was capable of finding one such function that satisfied all the requirements i.e., $p(x)=x+16$. However, I doubt that this function is the only function that follows the requirements. Can anyone confirm?
 A: Hint: We must have $8-c \mid 24-7 = 17$.
Edit: This follows from the fact that if $p(x) \in \mathbb{Z}[x]$, then $a-b \mid p(a) - p(b)$. The proof of this is short: if $p(x) = c_nx^n+c_{n-1}x^{n-1} + \dots + c_0$, then $p(a) - p(b) = c_n(a^n - b^n) + \dots + c_1(a-b)$, and since $a-b \mid a^k - b^k, k\in \mathbb{N}$, we get the result.
So we necessarily have $8-c \mid 17$ implying that $8-c = \pm 1, \pm 17$, giving us possible values of $c = 7,9$ or $25$. But, the question remains whether this is a $\textit{sufficient}$ condition for the existence of a polynomial $p(x)$ such that $p(8) = 24$ and $p(c) = 7$. Well, we can explicitly demonstrate monic quadratic polynomials for which this is true. Using the remainder theorem, we know $p_c(x) = (x-c)(x-r) + 7$. Since we want $p_c(8) = 24$, we get $$p_c(8) = 24 = (8-c)(8-r) + 7,$$ so that 
$$ r = 8 - \frac{17}{8-c} .$$ This formula for $r$ will always give an integer for $c = 7,9$ or $25$ because we got those values in the first place by insisting that $8-c \mid 17$. Therefore, $c = 7,9,$ or $25$.
