Originally Posted by

**topsquark** Can't be done, in general.

However I suspect you are learning about arithmatic and geometric series, which have the following formulas (respectively)

$\displaystyle a_n = a_0 + nd$

$\displaystyle a_n = a_0r^n$

Each of these equations has two unknowns in it ($\displaystyle a_0, d$ and $\displaystyle a_0,r$ respectively) so we need two numbers in the series in order to solve for them. BUT we can always write both an arithmatic and geometric series between any two numbers, so to distinguish between the cases we need an extra number. So your answer is likely that you need three numbers from the series.

However, not all series are so nice. For example, the Fibbonacci series

$\displaystyle a_n = a_{n - 1} + a_{n - 2};~a_0 = 1, ~ a_1 = 1$

fits neither of these types of series, and of course the series of numbers 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, ... representing the digits of $\displaystyle \pi$ follow no known pattern. So your problem is insolvable in general.

-Dan