Chapter Fibonacci numbers The Fibonacci sequence The Fibonacci numbers F n are defined recursively by F n+ = F n + F n, F 0 = 0, F = The first few Fibonacci numbers are n 0 5 6 7 8 9 0 F n 0 5 8 55 89 An explicit expression can be obtained for the Fibonacci numbers by finding their generating function, which is the formal power series F(x) := F 0 + F x + + F n x n + From the defining relations, we have F x = F x x + F 0 x, F x = F x x + F x x, F x = F x x + F x x, F n x n = F n x n x + F n x n x,
0 Fibonacci numbers Combining these relations we have F(x) (F 0 + F x) = (F(x) F 0 ) x + F(x) x, F(x) x = F(x) x + F(x) x, ( x x )F(x) = x Thus, we obtain the generating function of the Fibonacci numbers: x F(x) = x x There is a factorization of x x by making use of the roots of the quadratic polynomial Let α > β be the two roots We have More explicitly, α = α + β =, αβ = 5 + 5, β = Now, since x x = ( αx)( βx), we have a partial fraction decomposition x x x = x ( αx)( βx) = ( α β αx ) βx Each of making use of and αx βx has a simple power series expansion In fact, x = + x + x + + x n + = and noting that α β = 5, we have ( x x x = α n x n 5 α n β n = x n 5 x n, ) β n x n The coefficients of this power series are the Fibonacci numbers: F n = αn β n 5, n = 0,,,
The Fibonacci sequence 0 F n is the integer nearest to αn 5 : F n = { α n 5 } Proof F n αn 5 = β n < < 5 5 For n, F n+ = {αf n } Proof Note that For n, F n+ αf n = αβn β n+ = F n+ αf n = β n < α β 5 β n = β n lim n F n+ F n = α Exercise (a) Make use of only the fact that 987 is a Fibonacci number to confirm that 77 is also a Fibonacci number, and find all intermediate Fibonacci numbers (b) Make use of the result of (a) to decide if 7506 is a Fibonacci number Prove by mathematical induction the Cassini formula: F n+ F n F n = ( )n The conversion from miles into kilometers can be neatly expressed by the Fibonacci numbers miles 5 8 kilometers 8
0 Fibonacci numbers How far does this go? Taking meter as 97 inches, what is the largest n for which F n miles can be approximated by F n+ kilometers, correct to the nearest whole number? Prove the Fermat Last Theorem for Fibonacci numbers: there is no solution of x n + y n = z n, n, in which x, y, z are (nonzero) Fibonacci numbers Some relations of Fibonacci numbers Sum of consecutive Fibonacci numbers: n F k = F n+ k= Sum of consecutive odd Fibonacci numbers: n F k = F n k= Sum of consecutive even Fibonacci numbers: n F k = F n+ k= Sum of squares of consecutive Fibonacci numbers: n Fk = F nf n+ k= 5 Cassini s formula: F n+ F n F n = ( )n
Fibonacci numbers and binomial coefficients 05 Fibonacci numbers and binomial coefficients Rewriting the generating function x x x = x (x+x ) as x + x(x + x ) + x(x + x ) + x(x + x ) + x(x+ ) + = x + x ( + x) + x ( + x) + x ( + x) + x 5 ( + x) + = x + x + x + x + x 5 + + x + x + x 5 + x 6 + + x 5 + x 6 + 6x 7 + + x 7 + x 8 + + x 9 + + we obtain the following expressions of the Fibonacci numbers in terms of the binomial coefficents: F = F = F = F = F 5 = F 6 = F 7 = F 8 = ( ) 0 0 =, ( ) 0 =, ( ) ( ) + 0 =, ( ) ( ) + 0 = + =, ( ) ( ) ( ) + + 0 = + + = 5, ( ) ( ) ( ) 5 + + 0 = + + = 8, ( ) ( ) ( ) ( ) 6 5 + + + 0 = + 5 + 6 + =, ( ) ( ) ( ) ( ) 7 6 5 + + + 0 = + 6 + 0 + =,
06 Fibonacci numbers Theorem For k 0, F k+ = k ( ) k j j j=0 Proof x x x = x (x + x ) n = = = = x n+ ( + x) n n ( ) n x n+ x m m m=0 n ( ) n x n+m+ m m=0 k ( ) k j x k+ j k= j=0
Chapter 5 Counting with Fibonacci numbers 5 Squares and dominos In how many ways can a n rectangle be tiled with unit squares and dominos ( squares)? 0 5 7 8 9 0 56789 0 0 0 0 56 0 5 7 8 9 0 56789 56 Suppose there are a n ways of tiling a n rectangle There are two types of such tilings (i) The rightmost is tiled by a unit square There are a n of these tilings (ii) The rightmost is tiled by a domino There are a n of these Therefore, a n = a n + a n Note that a = and a = These are consecutive Fibonacci numbers: a = F and a = F Since the recurrence is the same as the Fibonacci sequence, it follows that a n = F n+ for every n
08 Counting with Fibonacci numbers 5 Fat subsets of [n] A subset A of [n] := {,, n} is called fat if for every a A, a A (the number of elements of A) For example, A = {, 5} is fat but B = {,, 5} is not Note that the empty set is fat How many fat subsets does [n] have? Solution Suppose there are b n fat subsets of [n] Clearly, b = (every subset is fat) and b = (all subsets except [] itself is fat) Here are the 5 fat subsets of []:, {}, {}, {}, {, } There are two kinds of fat subsets of [n] (i) Those fat subsets which do not contain n are actually fat subsets of [n ], and conversely There are b n of them (ii) Let A be a fat subset of m elements and n A If m =, then A = {n} If m >, then every element of A is greater than The subset A := {j : j < n, j A} has m elements, each m since j m for every j A Note that A does not contain n It is a fat subset of [n ] There are b n such subsets We have established the recurrence b n = b n + b n This is the same recurrence for the Fibonacci numbers Now, since b = = F and b = = F, it follows that b n = F n+ for every n Exercise (a) How many permutations π : [n] [n] satisfy π(i) i, i =,,, n? (b) Let π be a permutation satisfying the condition in (a) Suppose for distinct a, b [n], π(a) = b Prove that π(b) = a
5 An arrangement of pennies 09 5 An arrangement of pennies Consider arrangements of pennies in rows in which the pennies in any row are contiguous, and each penny not in the bottom row touches two pennies in the row below For example, the first one is allowed but not the second one: How many arrangements are there with n pennies in the bottom row? Here are the arrangements with pennies in the bottom, altogether Solution Let a n be the number of arrangements with n pennies in the bottom Clearly a =, a =, a = 5, a = A recurrence relation can be constructed by considering the number of pennies in the second bottom row This may be n, n,,, and also possibly none a n = a n + a n + + (n )a +
0 Counting with Fibonacci numbers Here are some beginning values: n a n 5 5 + + + =, 5 + 5 + + + =, 6 + + 5 + + 5 + = 89, These numbers are the old Fibonacci numbers: a = F, a = F, a = F 5, a = F 7, a 5 = F 9, a 6 = F From this we make the conjecture a n = F n for n Proof We prove by mathematical induction a stronger result: a n = F n, n a k = F n k= These are clearly true for n = Assuming these, we have a n+ = a n + a n + a n + + na + = (a n + a n + a n + + a ) + (a n + a n + + (n )a + ) = F n + a n = F n + F n = F n+ ; n+ n a k = a n+ + k= k= = F n+ + F n = F (n+) a k Therefore, the conjecture is established for all positive integers n In particular, a n = F n
Chapter 6 Fibonacci numbers 6 Factorization of Fibonacci numbers gcd(f m, F n ) = F gcd(m,n) If m n, then F m F n Here are the beginning values of F n F n : n F n F n L n = F n F n 8 7 5 5 55 6 8 8 7 77 9 8 987 7 (a) These quotients seem to satisfy the same recurrence as the Fibonacci numbers: each number is the sum of the preceding two (b) Therefore, it is reasonable to expect that each of these quotients can be expressed in terms of Fibonacci numbers
Fibonacci numbers n F n F n L n = F n F n F n + F n+ = + 8 = + 7 = + 5 5 5 55 = + 8 6 8 8 = 5 + 7 77 9 = 8 + 8 987 7 = + (c) Conjectures: (a) L n+ = L n+ + L n, L =, L = ; (b) L n = F n+ + F n These conjectures are true They are easy consequences of Theorem 6 (Lucas Theorem) F n = F n+ F n, F n+ = F n+ + F n Proof We prove this by mathematical induction These are true for n = Assume these hold Then F n+ = F n+ + F n = (Fn+ + Fn) + (Fn+ Fn ) = (Fn+ + Fn+) + (Fn Fn ) = Fn+ + Fn+ + (F n + F n )(F n F n ) = Fn+ + Fn+ + F n+(f n F n ) = Fn+ + F n+(f n+ + (F n F n )) = Fn+ + F n+(f n + (F n+ F n )) = Fn+ + F n+f n = Fn+ + F n+f n + Fn Fn = Fn+ Fn; F n+ = F n+ + F n+ = (Fn+ Fn) + (Fn+ + Fn) = Fn+ + Fn+
6 Factorization of Fibonacci numbers Therefore the statements are true for all n 5 By Lucas theorem, F n = F n+ F n = (F n+ F n )(F n+ +F n ) = F n (F n+ +F n ) If we put L n = F n+ + F n, then L = F + F 0 =, L = F + F = + =, and L n+ = F n+ +F n+ = (F n+ +F n )+(F n+ +F n ) = L n+ +L n 6 If F n is prime, then n is prime The converse is not true Of course, F = is not a prime What is the least odd prime p for which F p is not prime? 7 Apart from F 0 = 0 and F = F =, there is only one more Fibonacci number which is a square What is this?
Fibonacci numbers 6 The Lucas numbers The sequence (L n ) satisfyin L n+ = L n+ + L n, L =, L =, is called the Lucas sequence, and L n the n-th Lucas number Here are the beginning Lucas numbers n 5 6 7 8 9 0 L n 7 8 9 7 76 99 Let α > β be the roots of the quadratic polynomial x x L n = α n + β n L n+ + L n = 5F n F k = L L L L 8 L k L = and L = are the only square Lucas numbers (U Alfred, 96) Exercise Prove that L n = L n + ( )n Solution L n = α n + β n = (α n + β n ) (αβ) n = L n ( ) n Express F n F n in terms of L n Solution F n = F n L n = F n L n L n = F n (L n + ( )n L n ) Express F n F n in terms of L n Answer F n = F n (L n + ( ) n )
6 Counting circular permutations 5 6 Counting circular permutations Let n The numbers,,, n are arranged in a circle How many permutations are there so that each number is not moved more than one place? Solution (a) π(n) = n There are F n permutations of [n ] satisfying π(i) i (b) π(n) = (i) If π() =, then π() =,, π(n ) = n (ii) If π() = n, then π restricts to a permutation of [,, n ] satisfying π(i) i There are F n such permutations (c) π(n) = n (i) If π(n ) = n, then π(n ) = n,, π() =, π() = n (ii) If π(n ) = n, then π restricts to a permutation of [, n ] satisfying π(i) i There are F n such permutations Therefore, there are altogether F n + (F n + ) = L n + such circular permutations For n =, this is L + = 9