I was thinking about questions you sometimes see of the form
Find the next $3$ terms of the sequence $2, 3, 5, 7, ...$
Presumably this example would want us to find the next three prime numbers, but it occurred to me that this could also be the sequence of roots, in ascending order, of the polynomial $(x-2)(x-3)(x-5)(x-7)...$ in which case the answer is any three numbers I darn well feel like as long as they are greater than 7 and in ascending order.
I am wondering if there are more general ways to do this where, given $n$ terms of a sequence, I can find a function $f:\mathbb{N}\rightarrow \mathbb{N}$ such that $f(i)$ for $i\leq n$ is the $i$th term of the given sequence, and for $i>n$ it's whatever I want. Polynomial roots don't work because there are finitely many of them, and I would like my sequence to be infinite. I imagine that maybe we would have to incorporate trigonometric functions.
I tried searching around on the internet but I didn't know what to search for. Anyone know if this is a thing?