Given a set of values how can one determine whether any polynomial (say p) of degree atmost 3 and having real coefficients exists such that $\displaystyle p(i) = x$_i$$ for alli?

E.g;

For the set of values:

0,1,2,3,4

there exists such a polynomial but for values:0,1,2,4,5 there isn't.

Is it related to some theorem?

Thanks.