1. ## polynomial

Challenge Question:

Suppose I have a polynomial $\displaystyle p(x)$ with positive integral coefficients. You give me an integer $\displaystyle a$ and I give you $\displaystyle p(a)$. You then give me an integer $\displaystyle b$ and I give you $\displaystyle p(b)$. Your objective is to determine $\displaystyle p(x)$.

How would you do so?

2. Originally Posted by Sampras
Challenge Question:

Suppose I have a polynomial $\displaystyle p(x)$ with positive integral coefficients. You give me an integer $\displaystyle a$ and I give you $\displaystyle p(a)$. You then give me an integer $\displaystyle b$ and I give you $\displaystyle p(b)$. Your objective is to determine $\displaystyle p(x)$.
I think this strategy ought to work:
Spoiler:
I take a = 1 and on being told p(a) I choose b = p(a)+1. On receiving p(b), I express it to the base b. If $\displaystyle p(b) = a_0 + a_1b + a_2b^2 + \ldots + a_nb^n$ then the polynomial must have been $\displaystyle p(x) = a_0 + a_1x + a_2x^2 + \ldots + a_nx^n$.

3. Originally Posted by Opalg
I think this strategy ought to work:
Spoiler:
I take a = 1 and on being told p(a) I choose b = p(a)+1. On receiving p(b), I express it to the base b. If $\displaystyle p(b) = a_0 + a_1b + a_2b^2 + \ldots + a_nb^n$ then the polynomial must have been $\displaystyle p(x) = a_0 + a_1x + a_2x^2 + \ldots + a_nx^n$.
It's probably easiest to see this by looking at an example. Suppose that you think of a polynomial (with positive integral coefficients). You don't tell me what it is, so all I know is that it is some expression of the form $\displaystyle p(x) = a_0+a_1x+\ldots+a_nx^n$. I ask you for p(1) and you tell me that p(1)=9. That tells me that $\displaystyle a_0+a_1+\ldots+a_n = 9$. In particular, each of the coefficients $\displaystyle a_k$ must lie between 0 and 9.
I then ask you for p(10) and you tell me that p(10) = 1243. I then express that number in base 10. (Of course, I have made this example easy, because 1243 is already in base 10.) So I know that $\displaystyle a_0+a_1\times10+\ldots+a_n\times10^n = 3 + 4\times10+2\times10^2+1\times10^3$. But there is a unique way to express a number in base 10, with all the digits lying between 0 and 9, so I can immediately read off that n=3 and $\displaystyle a_0=3$, $\displaystyle a_1=4$, $\displaystyle a_2=2$ and $\displaystyle a_3=1$.
At that point, I can astonish you by revealing that your polynomial was $\displaystyle p(x) = x^3+2x^2+4x+3$.