TITLE: Identify $P(2014)$ if $P(i)=1/i$ for every positive integer $1\le i\le2013$
QUESTION [6 upvotes]: Suppose $P(x)$ is a polynomial of degree $2012$ and $P(x) = 1/x$ when $x$ takes the integer values $1\cdots2013$ (inclusive). What is the value of $P(2014)$?

I get $1/1007$ but I'm not sure if it's right, and my method is very inelegant.

REPLY [15 votes]: Note that $x\cdot P(x)$ is a polynomial of degree $2013$ that attains the value $1$ in the $2013$ points $1,2,\dotsc,2013$. So
$$x\cdot P(x) = 1 + c\cdot\prod_{k=1}^{2013} (x-k).$$
Now, $x\cdot P(x)$ evidently attains the value $0$ in $x = 0$, so
$$0 = 1 + c\cdot (-1)^{2013}\cdot 2013!$$
or $c = \dfrac{1}{2013!}$. Then
$$2014\cdot P(2014) = 1 + \frac{1}{2013!}\cdot 2013! = 2,$$
and indeed
$$P(2014) = \frac{2}{2014} = \frac{1}{1007}.$$