This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Great problem, Christoper! +1
I'll rewrite this summation as below
i = 0 ∑ ⌊ 2 n ⌋ ( i n − i )
I will prove that this expression is equivalent to f n + 1 , where f x is the x th term of the Fibonacci sequence.
Consider the number of ways to walk up n stairs taking 1 or 2 steps at a time. Here, you can take i double steps and n − 2 i single steps, so by the Supermarket Principle, there are ( i n − 2 i + i ) = ( i n − i ) number of ways of going up n stairs using i double steps. Summing this for all i , there are
i = 0 ∑ ⌊ 2 n ⌋ ( i n − i )
number of ways of doing so. However, we can also recursively define this. Let A n denote the number of ways of climbing n stairs using single or double steps. We have that A n = A n − 1 + A n − 2 since it only requires a single or double step to get to the n th stair, respectively. We also have A 1 as 1 and A 2 as 2. Notice that f 2 = 1 , f 3 = 2 , and both this stair-counting and Fibonacci sequences are similarly defined (i.e. A 1 = f 2 , A 2 = f 3 , etc). Thus, we must have A n = f n + 1 . Therefore,
i = 0 ∑ ⌊ 2 n ⌋ ( i n − i ) = f n + 1
We will now prove gcd ( f m , f n ) = f gcd ( m , n ) .
Let's break this down into manageable chunks we can prove more easily.
Part 1: gcd ( f n , f n − 1 ) = 1 for all positive integers n .
We have gcd ( f n , f n 1 ) = gcd ( f n − 1 + f n − 2 , f n 1 ) = gcd ( f n − 1 , f n 2 ) , by the division algorithm. Thus, if we apply this repeatedly, we have
gcd ( f n , f n − 1 ) = gcd ( f n − 1 , f n − 2 ) = gcd ( f n − 2 , f n − 3 ) = … = gcd ( f 2 , f 1 ) = 1
Thus, our first lemma is true.
Part 2: f m + n = f m + 1 f n + f m f n − 1 for all positive integers m and n greater than 1.
The above statement directly follows if we can induct the below expression on k :
f N = f k + 1 f N − k + f k f N − k − 1
for all positive integers N > 1 and all k = 1 , 2 , . . . , N − 2 .This statement is easily seen to be true for k = 1 and the induction will be complete once we have verified that f k + 1 f N − k + f k f N − k − 1 = f k + 2 f N − k − 1 + f k + 1 f N − k − 2 . However, this is equivalent to f k + 1 ( f N − k − f N − k − 2 ) = f N − k − 1 ( f k + 2 − f k ) , which on turn is equivalent to f k + 1 f N − k − 1 = f N − k − 1 f k + 1 . This expression is obviously true, so we are done. Therefore, our second lemma is true.
Part 3: If m ∣ n , then f m ∣ f n .
We will prove by induction on k that f m ∣ f k m for every positive integer k . The statement is easily seen to be true when k = 1 . Furthermore, f m ∣ f k m implies f m ∣ f k m + 1 f m + f k m f m − 1 = f ( m + 1 ) k from our second lemma. Thus, this is easily shown by induction to be true.
Part 4: If n = q m + r , then gcd ( f m , f n ) = gcd ( f m , f r ) .
We simply write f n = f q m + r = f q m + 1 f r + f q m f r − 1 , which implies that
gcd ( f m , f n ) = gcd ( f m , f q m + 1 f r + f q m f r − 1 ) = gcd ( f m , f q m + 1 f r ) = gcd ( f m , f r )
where we used the division algorithm from the first line to the second line, and used the first lemma to pass from the second line to the third line.
If we write n = q m + r , then the statement gcd ( f m , f n ) = gcd ( f m , f r ) is quite similar to the statement gcd ( m , n ) = gcd ( m , r ) , which is the the basis of Euclid's algorithm. In fact, the only difference is that the letter f has been added into the picture. Therefore, applying Euclid's algorithm to two Fibonacci numbers gives the result gcd ( f m , f n ) = f gcd ( m , n ) .
Finally, we have F ( 1 0 1 ) = f 1 0 2 and F ( 1 1 8 ) = f 1 1 9 , and gcd ( 1 0 2 , 1 1 9 ) = 1 7 , so our answer is f 1 7 = 1 5 9 7 . QED