# Does this mathematical problem have a name?

Suppose we have a finite sequence of (seemingly) random numbers, such as $$1, 5, 3, 6, 11, 14, ...$$ Can we devise a function $f(x)$ such that for the $i^{th}$ value $x_i$ in the sequence $f(i) = x_i$? For example, for the above sequence, $$f(1) = 1, \hspace{5mm} f(2) = 5, \hspace{5mm} ...$$

Does this problem have a name?

• Commented Feb 7, 2018 at 12:49
• It is called extrapolation
– user525761
Commented Feb 7, 2018 at 12:49
• @treeleaf: no, extrapolation computes new values.
– user65203
Commented Feb 7, 2018 at 13:13
• @YvesDaoust Shh. No, extrapolation.
– user525761
Commented Feb 7, 2018 at 13:14
• @treeleaf: the OP is not explicitly asking to compute new values. In fact he is asking neither interpolation nor extrapolation.
– user65203
Commented Feb 7, 2018 at 16:36

This question is pretty ambiguous.

Specifying the finite sequence of numbers, such as

$$1, 5, 3, 6, 11, 14$$

(more precisely $f:=\{(1,1),(2,5),(3,6),(4,11),(5,14)\}$)

is a function definition, and this function satisfies your requirements, so there is no need to look further.

But you probably want a formula (i.e. a closed-form expression), not a function, such that it evaluates to the given values at the given indexes.

Such a formula should allow you to compute values for other arguments, which is called interpolation when perfomed between the known indexes, or extrapolation when performed outside.

There are well-known methods to achieve this, for instance using a single polynomial (Lagrangian interpolation) or piecewise polynomials (cubic splines). Note that they can be good for interpolation, and are often very poor for extrapolation.

Another understanding of your question, is if it is possible to find a simple expression that matches the numbers, for instance $2,3,5,9,17,33,65$ being described complactly as $f_i=2^i+1$. This is in relation with the concepts of pattern matching and minimum description length, and as far as I know, there is little theory available.

You might call that sequence identification.

Yes, we can always find such a function, and if we restrict our attention to polynomial functions $f$ there is in fact a canonical solution: Given a set of $n + 1$ data points $(x_i, y_i)$ (with pairwise distinct $x_i$), there is a unique polynomial of degree at most $n$ satisfying the interpolation condition $p(x_i) = y_i$---in our case we have $x_i = i$, $i = 1, \ldots, n + 1$.

This construction need not always give the most sensible function satisfying the condition, however: There are many sequences $(y_i)$ for which the (speaking deliberately imprecisely) simplest or most natural function $f$ satisfying $f(i) = y_i$ is not polynomial. For example, we can immediately recognize the terms of the finite sequence $(2, 4, 8, 16, 32)$ as successive powers of $2$, that is, that we can satisfy the condition with the simple function $$f(x) = 2^x .$$ This is, intuitively, much simpler that the polynomial interpretation of that data, $$p(x) = \tfrac{1}{12}(x^4 - 6 x^3 + 23 x^2 - 18 x + 24) .$$