Continuous function that contains all Fibonacci terms?

First, I know the Fibonacci sequence isn’t quite a function - it’s more like a binary operation, but it’s not really that either.

So I’m defining the function as

f(x) = the xth term of the Fibonacci sequence.

f(1) = 1
f(2) = 1
f(3) = 2
f(4) = 3
f(5) = 5
etc.

I know that given any finite number of points you can develop a polynomial function that contains all those points, but is there a continuous function that contains every point of the Fibonacci sequence?

It has a known closed form that’s been known for some time.

It’s not the kind of thing we normally think of when we think of functions, but you can consider any sequence to be a function whose domain is the set of natural numbers.

There are plenty of continuous functions that do what you want: For instance, you could just linearly interpolate between adjacent values. What you really want is a smooth function (where smooth can be defined in a variety of ways, but usually means that the function and all of its derivatives are continuous).

ftg already pointed it out, but just to save you the clicking time, one smooth solution is given by Binet’s formula, f(n) = [phi^n - (1 - phi)^n]/sqrt(5), where phi = [1 + sqrt(5)]/2.

To derive this, consider the sequence of vectors given by V(n) = <F(n), F(n+1)>. Note that there is a fixed linear transformation M which sends V(n) to V(n+1) [namely, the one which sends <a, b> to <b, a+b>]; thus, V(n) = M^n * V(0). If M has n linearly independent eigenvectors, then it can be diagonalized, automatically yielding a closed formula for (the matrix representing) M^n, and thus for V(n), and thus for F(n); carrying this out is exactly what obtains Binet’s formula.

(Oh, replace ‘F’ with ‘f’ as necessary above.)

By the way, if you have a continuous real valued function defined on a closed subset of the reals, you can always continuously extend it to all of the reals (this is a special case of Tietze’s extension theorem). Since (any subset of) the integers is closed, any sequence can be continuously extended to all of the reals.

Indistinguishable’s formula is not quite right. Let g = (1 + sqrt(5))/2 (that’s the golden ratio) and h = (1 - sqrt(5))/2 (which I would usually call g-bar, the conjugate). Then f_n = (g^n - h^n)/sqrt(5), so you could define f(x) = (g^x - h^x)/sqrt(5). Of course, there will be many many more continuous functions (for example, you could interpolate linearly between each value and the next, or put in any fanciful curve you like between any two successive values). Notice that since h^n alternates sign and rapidly converges to 0 and sqrt(5) > 2, it follows that f_n is the nearest integer to g^n/sqrt(5), but alternates being above and below that value.

Wait, what’s wrong with my formula? h = 1 - g, making your formula the same as mine.

That seems trivially easy to prove… Is there a corresponding theorem for smooth functions, or even for analytic ones?

Well, any sequence of reals, considered as a function of type N -> R, extends to a smooth function of type R -> R using infinitary linear combinations of bump functions.

[I.e., just put a narrow bump of the right height around each natural number]

Yes, there is a corresponding theorem for smooth functions, which also holds for for any smooth manifold and not just Euclidean space. The idea behind the proof is that you rewrite your function as a sum of bump functions, like Indistinguishable did above.

But there is not analogous theorem for analytic functions (neither in the real-analytic or complex-analytic case). For instance, if A is any closed ball in the complex plane not containing the origin, f(z) = 1/z is analytic on A. But this function cannot be extended to a function g analytic on the whole complex plane, since g would have to have the same power series expansion as f about any point in A, which means that g would not be analytic at z = 0. A similar argument shows this example applies to the real-analytic case as well.

My apologies–I didn’t read your formula carefully enough and missed the second term.

I am not sure what you mean by “smooth”, but it is true for infinitely differentiable functions, although not, as already observed, for analytic. The argument for infinitely differentiable makes use of translates of the function whose value for positive x is e^{-(1/x^2)} and which is 0 at 0 and for all negative x. This function is infinitely differentiable at 0 and can be used to interpolate between different slopes.

Yeah, I should have thought of that… That’s one of my favorite functions.