Finding all the polynomials such that $p(1)=2, p(2)=3$ So the full problem is:
Find all the polynomials $p$ of degree at most $2016$ such that $p(1) = 2, p(2) = 3,..., p(2017) = 2018$.
It seems that the degree value of 2016 is arbitrary but beyond that I'm not sure where to start, any ideas?
 A: The general solution is given by
$$f(x)=x+1+P(x)(x-1)(x-2)\cdots(x-2017),$$
where $P(x)$ is a general polynomial. Since $f(x)$ is known to be a polynomial with degree no more than $2016$, we have $P(x)=0$. This is because $(x-1)(x-2)\cdots(x-2017)$ has degree $2017$. If $P(x)\neq 0$, we have $\deg P\geq 0$. Therefore, the degree of the extra term is $\geq 2017$, contradicting our premise. Therefore $P(x)=0$ ($\deg P=-\infty$), which means $f(x)=x+1$.
A: Obviously $p(n)=n+1$ is such a polynomial. Now suppose there exists a polynomial $p(n)$ of degree $2016 \geq d>1$ such that,
$$p(n)=n+1$$
For $n=1,2,....,2016,2017$.
Then,
$$p(n)-n-1=0$$
Has at least $2017$ roots (1,2,3,...2016,2017) etc. But by the fundamental theorem of algebra, since $p(n)-n-1$ is of degree $d \leq 2016$,...(can you finish).
A: You can use Lagrange's interpolation formula to get the unique polynomial with the said properties as follows:
Set your data points $(1,p(1)),(2,p(2))\cdots $as $(x_1,y_1),(x_2,y_2)\cdots $respectively, then your interpolating polynomial is given by
$$p(x)=\sum_{n=1}^{2017} a_n(x)y_n$$
where $a_n(x)=\prod_{j=1,j\neq n}^{2017}\frac{x-x_j}{x_n-x_j}$.
 For a general proof look at the proof of Lagrange's interpolation formula.
