Fibonacci and Tribonacci sequences


By Dean Hanafy on Sunday, November 24, 2002 - 04:54 pm:

I was wondering if anybody knows where there is a derivation of Binet's formula for the Fibonacci sequence, and whether there is a similar formula for the Tribonacci sequence (with a derivation)...

Cheers
Deano


By Ben Tormey on Sunday, November 24, 2002 - 05:20 pm:
The Fibonacci recurrence is

Fn+1=Fn+Fn-1,(n ³ 1; F0=0; F1=1) (1)

and the generating function of the sequence is


F(x)=
å
n ³ 0 
Fn xn

.

Multiply (1) by xn and sum over n ³ 1 to get

(F(x)-x)/x=F(x)+xF(x),

it follows that

F(x)=x/(1-x-x2).

Now

1-x-x2=(1-C+x)(1-C-x), (C±=(1±Ö5)/2)

and so
x/(1-x-x2)
=
x/((1-C+x)(1-C-x))
=
1/(C+-C-)(1/(1-C+x)-1/(1-C-x))
=
1/Ö5 æ
è

å
j ³ 0 
C+j xj -
å
j ³ 0 
C-j xj ö
ø
which is just the difference of two geometric series, hence

Fn=1/Ö5(C+n-C-n) (n=0, 1, 2, ...). (2)

But since C+ > 1 and C- < 1, the second term is small enough to ignore, so a good approximation to Fn is

Fn=1/Ö5((1+Ö5)/2)n. (3)

In fact Fn is just the nearest integer to (3).


By Yatir Halevi on Sunday, November 24, 2002 - 06:00 pm:

Or...
x2 -x-1=0 has two roots A and B, they must satisfy:
A2 =A+1 and B2 =B+1
Multiply the first by An and the second by Bn , we get:
An+2 =An+1 +1 and Bn+2 =Bn+1 +1
Subtract the first from the second and divide by A-B
to get
(An+2 -Bn+2 )/(A-B)=(An+1 -Bn+1 )/(A-B)+(An -Bn )/(A-B)
set Hn =(An -Bn )/(A-B)


Notice that A+B=1, A-B=Ö5 and AB=-1
Hence
H1 =(A-B)/(A-B)=1 H2 =(A2 -B2 )/(A-B)=1
Resulting in the fact that Hn is exactly the fibonacci sequence!
(Taken from 'Elementary Number Theory' By David M. Burton.)

Yatir
By Demetres Christofides on Sunday, November 24, 2002 - 06:34 pm:

A way to understand why Yatir's method works is the following:
Fn+1 -Fn -Fn-1 = 0 (*)
Suppose the solution is of the form Fn = An . This gives the equation A2 -A-1 = 0. This has two roots say x and y.
Now notice that if g(n),h(n) are solutions of (*) then so is ag(n)+bh(n) for any constants a,b.
So axn + byn is a solution of (*).
Using F1 =F2 =1 you can find a and b.

This looks very much like the method of solving ordinary differential equations with constant coefficients. Equation (*) is a second order difference equation with constant coefficients.

Demetres


By Dean Hanafy on Sunday, November 24, 2002 - 09:36 pm:

Demetres,

could you please elaborate a little more where you say:

Now notice that if g(n),h(n) are solutions of (*) then so is ag(n)+bh(n) for any constants a,b.
So axn + byn is a solution of (*).

Thanks
Deano


By Demetres Christofides on Sunday, November 24, 2002 - 09:47 pm:

Suppose that g(n) , h(n) satisfy (*) i.e. g(n+1) - g(n) - g(n-1) = 0 and h(n+1) - h(n) - h(n-1) = 0 . Then if we define a new function f by f(n) = ag(n) + bg(n) where a,b are any constants then it is easy to show that f(n+1) - f(n) - f(n-1) = 0.

Did you understand why xn and yn where solutions of (*) or do you also want me to elaborete more on that ?

Demetres


By Ben Tormey on Sunday, November 24, 2002 - 10:37 pm:

The Tribonacci recurrence is


Tn+3=Tn+2+Tn+1+Tn, (n ³ 4; T0=1; T1=1; T2=2). (1)

The generating function of the sequence is


T(x)=
å
n ³ 0 
Tn xn

.

Multiply (1) by xn and sum over n ³ 4

(T(x)-x-2x2)/x2=T(x)+xT(x)

it follows that

T(x)=1/(1-x-x2-x3).(2)


You can use this generating function to calculate the coefficients; there is an explicit formula for Tn (see Mathworld for example) but it is very messy; for an asymptotic formula for Tn , use Darboux's lemma.


By Ben Tormey on Tuesday, November 26, 2002 - 05:46 pm: (Darboux's lemma) Let v(z) be analytic in some disk |z| < 1+h, and suppose that in a neighbourhood of z=1 it has the expansion
v(z)= å
vj(1-z)j

. Let b Î {0,1,2,¼}. Then
[zn]((1-z)b v(z))
=
[zn] æ
è
m
å
j=0 
vj (1-z)b+j ö
ø
+ O(n-m-b-2)
=
m
å
j=0 
vj n-b-j-1Cn O(n-m-b-2)


The symbol [zn ] means the coefficient of zn .

This will work as long as there is just one algebraic singularity on the circle of convergence.
By Dean Hanafy on Monday, November 25, 2002 - 06:16 pm:

Thanks Ben and Yatir,

Demetres,

I "kind of" understand :) why xn and yn were solutions, but if you could clarify once more just to make it crystal clear that i understand :), then it would be greatly appreciated...

Thanks a lot
Deano


By Demetres Christofides on Tuesday, November 26, 2002 - 03:33 pm:
Dean I first assumed that An is a solution. (If you have met differential equations before compare it with the case where you assume the solution is of the form em x)

From this I got the equation A2-A-1 which gives two solutions x and y ( I just didn't bother to write them down explicitly they are [1±Ö5]/2. Then you can easily check that these satisfy (*) since xn+1-xn-xn-1=xn-1[x2-x-1]=0 (and similarly for y)

Demetres