Number sequences - from discrete to continuous

Is there a way of naturally interpolating for certain sequences such that not just integers, but any real number can be in the domain, eg.

If you plot (x,y) where x=1,2,3,… and y=Fib[sub]n[/sub] (the nth Fibonacci number) you’d get the points (0,0), (1,1), (2,1), (3,2), (4,3), (5,5), (6,8), etc. Is there a way to make this point-wise curve continuous so that it’s defined for, say, x=3.5 and still has the flavour of the Fibonacci sequence.

If you plot (x,y) where y=x! you’d get the points (0,1), (1,1), (2,2), (3,6), (4,24), (5,120), etc. Is there a way to make this point-wise curve continuous, say for x = 3.5 and still retain the sense of x!

In general the answer depends on the sequence. (Not to mention what you mean by the “flavour” or “sense” of the sequence.) But in both of your two examples there is a nice way to extend the sequence to the real numbers.

For the Fibonacci numbers use the fact that there’s a general formula, namely


Fib[sub]n[/sub] = (r[sub]1[/sub])[sup]n[/sup]/sqrt(5) - (r[sub]2[/sub])[sup]n[/sup]/sqrt(5)

where r[sub]1[/sub]=(1+sqrt(5))/2 and r[sub]2[/sub]=(1-sqrt(5))/2. This formula extends to all the real numbers, and still preserves the property that Fib[sub]n+2[/sub]=Fib[sub]n+1[/sub]+Fib[sub]n[/sub]. There are similar formulas for other sequences defined by recursive formulas like the Fibonacci relation.

Extending factorials is a lot harder, but still possible. There’s a function called the Gamma function which is defined for every real number except 0 and the negative integers, and which has the properties that Gamma(x)=(x-1)! for every positive integer x, and Gamma(x+1)=x*Gamma(x). You can use this to extend factorials to real numbers while still preserving the property that (x+1)!=(x+1)*x!. I’m not certain of the definition off the top of my head, but I think it’s:


Gamma(x)=int(t[sup]x-1[/sup]e[sup]-t[/sup],t=0..infinity)

where int(…,t) denotes integration with respect to t. (I’ll double-check that tomorrow when I have access to the textbooks in my office.)

Extending factorials to non-integers is especially interesting: you get suprising results like (-1/2)!=sqrt(pi).

Math Geek: Thank you. Excellent and helpful response.

I’m still digesting the gamma function. This may be obvious to you, but is Gamma(x) differentiable everywhere (other than at x=0)?

Wow…a post by the great Karl Guass?! We are honored! :slight_smile:

Hope you don’t consider this a hijack, but many years ago (when I was supposed to be studying something totally different for a math degree) I got curious about fractional differentials.

e.g. y = x ^ 3
dy/dx = 3x ^ 2
d2y/dx2 = 6x
d3y/dx3 = 6

What meaning to assign to

d(1/2)y/dx(1/2) ?!

I started playing around with it for a while, and came up with a general formula for d(n)y/dx(n) (not difficult - just follow the pattern). Ends up with one or two factorials - can’t remember exactly.

I then thought, whatever the general form for non-integers, it has to reduce to the integer version in simple cases. I ended up with some functional equation (i.e. “find the function which satisfies the following”) which I couldn’t solve - I didn’t have the math to do it. (Or maybe had slept through the appropriate lecture.) I vaguely remembered something about a gamma function for generalizing factorials to non-counting numbers, but couldn’t remember the details. (Hey - this was when the Internet was still a bunch of wires and green screens!)

Anyway - when I finally did research it, I was flattered to find that none other than the great Leibnitz had adopted almost exactly the same approach - except he was talented enough to take it to a conclusion. I believe his formula for d(1/2)y/dx(1/2) was pretty complicated, invovling a bunch of sines, cosines and exponentials. It didn’t indeed reduce to the simple case for integers (via identities like sin2x + cos2x = 1 etc.)

Anyone else know anything about these? Are there any practical applications? What about trying to imagine what something like d(1/2)x/dy(1/2) represents, geometrically? A web search didn’t turn up much (even wonderful Google.)

I am offended that you had to ‘guass’ at the spelling of my name:D

Very interesting. Not at all a hijack. It is exactly in the spirit of my OP.

MathGeek, I get 2.40975 + 0.0829962 I for Fib(3.5)

Fractals (some…all?) have non-integer dimensionality.

If you divide an n-dimensional figure into a number “little” pieces, the number of pieces within a distance r from some point is proportional to r [sup]n[/sup]. For fractals, it turns out that n can be non-integral.

It is, but I wouldn’t call it obvious by any means. You have to differentiate under the integral sign, which isn’t always possible when you have an indefinite integral like this one (that is, an integral over an infinite domain). It just happens to work in this case.

Whoops! You’re absolutely right. I forgot that r[sub]2[/sub] is negative, and you can’t just raise negative numbers to arbitrary powers without getting complex numbers as a result. Extending Fibonacci numbers to the real line may be trickier than I thought; I’ll have to think about that some more…

The gamma function has poles at all negative integers, so it isn’t differentiable at those points either. other than that, it’s OK.

I think that the fibonacci sequence is very easy to generate for arbitrary powers. Although it does not follow for the first few (you get within a few percent once n = 3) numbers, the following formula will do an adequate job of producing Fibonacci numbers:

F(n) = (phi^n)/sqrt(5)

where

phi = (1 + sqrt(5))/2


Math Geek, your formula is essentially correct, as the two R’s that you gave are the two roots you get when you solve the Fibonacci difference equation. However, similar to solving differential equations, the difference equation solution is actually:

C1*(R1^n) + C2*(R2^n)

Where R1 is phi, and R2 is the same, with a - instead of a +.

C1 winds up being 1/sqrt(5). And, I must confess that its been a while since I did difference equations, so I forget what happens to C2. All I know is that if C2 is zero, you get correct answers for F(n). It is accurate beyond my calculators range of precision at n = 12.


As a further note, phi is the golden mean, or approximately 1.618

C1 and C2 are determined by the initial conditions. In KarlGauss’s original post, he specified the initial conditions Fib[sub]0[/sub]=0 and Fib[sub]1[/sub]=1. If you substitute n=0 and n=1 into the general solution, you get C1+C2=0 and C1R1+C2R2=1, which together imply that C1=1/sqrt(5) and C2=-1/sqrt(5). That’s where I got the general formula that I quoted. (“Essentially” correct indeed :slight_smile: )

It’s true that if you set C2=0 instead, you get a formula which is accurate to the nearest integer. This is because |R2|<1, and hence the term C2*R2[sup]n[/sup] will contribute less and less to the formula as n tends to infinity. So the function F(x)=(R1[sup]x)[/sup]/sqrt(5) is well-defined (avoiding the problems with taking powers of a negative number that RM Mentock noticed) and has the property that F(x+2)=F(x+1)+F(x) for all x. But F(n) will only approximately equal Fib[sub]n[/sub] when n is an integer. This may or may not be satisfactory, depending on your point of view.