Lecture 09
Lecture 09
month 1 2 3 4 5 6 7
rabbits 1 1 2 3 5 8 13
Fibonacci Numbers
month 1 2 3 4 5 6 7
rabbits 1 1 2 3 5 8 13
Inductive Rule:
For n>3, Fib(n) =Fib(n-1) + Fib(n-2)
Sequences That Sum To n
Let fn+1 be the number of different
sequences of 1’s and 2’s that sum to n.
f3 = 2 2 = 1 + 1
2
Sequences That Sum To n
Let fn+1 be the number of different
sequences of 1’s and 2’s that sum to n.
4 =2 + 2
2 + 1 + 1
1 + 2 + 1
1 + 1 + 2
1 + 1 + 1+1
Sequences That Sum To n
Let fn+1 be the number of different
sequences of 1’s and 2’s that sum to n.
fn+1 = fn + fn-1
# of # of
sequences sequences
beginning beginning
with a 1 with a 2
Fibonacci Numbers Again
Let fn+1 be the number of different
sequences of 1’s and 2’s that sum to n.
fn+1 = fn + fn-1
f1 = 1 f2 = 1
Visual Representation: Tiling
Some examples:
F2n = F1 + F3 + F5 + … + F2n-1
m n
m-1 n-1
(Fn)2 = Fn-1 Fn+1 + (-1)n
n-1
n odd
Sneezwort (Achilleaptarmica)
1 + √5
φ=
2
Golden ratio supposed to arise
in…
a b
Parthenon, Athens (400 B.C.) The great pyramid at Gizeh
Mostly
circumstantial
Ratio of a person’s height evidence…
to the height of his/her navel
Expanding Recursively
Expanding Recursively
Continued Fraction
Representation
A (Simple) Continued Fraction Is Any
Expression Of The Form:
Denoted by [2,3,4,2,0,0,0,…]
An Infinite Continued Fraction
Denoted by [1,2,2,2,…]
Recursively Defined Form For CF
Continued fraction representation of
a standard fraction
e.g., 67/29 = 2 with remainder 9/29
= 2 + 1/ (29/9)
Ancient Greek Representation:
Continued Fraction Representation
Ancient Greek Representation:
Continued Fraction Representation
= [1,1,1,1,0,0,0,…]
Ancient Greek Representation:
Continued Fraction Representation
Ancient Greek Representation:
Continued Fraction Representation
= [1,1,1,1,1,0,0,0,…]
Ancient Greek Representation:
Continued Fraction Representation
= [1,1,1,1,1,1,0,0,0,…]
A Pattern?
Let r1 = [1,0,0,0,…] = 1
r2 = [1,1,0,0,0,…] = 2/1
r3 = [1,1,1,0,0,0…] = 3/2
r4 = [1,1,1,1,0,0,0…] = 5/3
and so on.
Theorem:
rn = Fib(n+1)/Fib(n)
1,1,2,3,5,8,13,21,34,55,….
2/1 = 2
3/2 = 1.5
5/3 = 1.666…
8/5 = 1.6
13/8 = 1.625
21/13 = 1.6153846…
34/21 = 1.61904…
φ = 1.6180339887498948482045
Pineapple whorls
Church and Turing were both
interested in the number of
whorls in each ring of the
spiral.
Theorem
Any rational has a finite
continued fraction
representation.
Hmm.
Finite CFs = Rationals.
Then what do
infinite continued fractions
represent?
An infinite continued fraction
Quadratic Equations
• X2 – 3x – 1 = 0
• X2 = 3X + 1
• X = 3 + 1/X
Converse:
Any periodic continued
fraction is the solution of a
quadratic equation.
(try to prove this!)
So they express more
than just the rationals…
No one knows!
What a cool representation!
Define: C1 = [a1,0,0,0,0..]
C2 = [a1,a2,0,0,0,...]
C3 = [a1,a2,a3,0,0,...] and so on.
C1 = 3
C2 = 22/7
C3 = 333/106
C4 = 355/113
C5 = 103993/33102
C6 =104348/33215
Continued Fraction
Representation
Continued Fraction
Representation
Remember?
Hence:
1,1,2,3,5,8,13,21,34,55,….
• 2/1 = 2
• 3/2 = 1.5
• 5/3 = 1.666…
• 8/5 = 1.6
• 13/8 = 1.625
• 21/13 = 1.6153846…
• 34/21 = 1.61904…
• φ = 1.6180339887498948482045...
As we’ve seen...
Going the Other Way
Recurrences and generating
functions
Golden ratio
Continued fractions
Convergents
Here’s What
You Need to Closed form for Fibonaccis
Know…
68