TITLE: Given a finite sequence, can we always find a relation that generates that sequence?
QUESTION [5 upvotes]: This is just something I've been wondering about, but I have no idea what the answer is. I suspect it's yes. 

Given an arbitrary finite sequence, can we always find a relation that generates that sequence?

For example, given $4, 7, 10, 13$ we can find at least one relation that generates this sequence, $a_n=3n+1$. Is always it possible to find a relation for any arbitrary finite sequence? If so, how about an infinite sequence? (you would have to be given an infinite number of terms I guess.)

REPLY [4 votes]: Consider a sequence of length n+1, $\{a_k\}_{k=0}^{n}$. The sequence specifies $n+1$ coordinates: $(0, a_0), ... , (n, a_n)$. 
You could use Lagrange's Interpolation Formula on these coordinates to find a polynomial which interpolates your specified sequence, i.e., some $p(x) \in \mathbb{R}_{n}[x]$ such that:
$$\{a_k\}_{k=0}^n = \{p(k)\}_{k=0}^n$$
So in terms of a specific relation: $a_n = p(n)$.