ReuvenLax

Another Math Puzzler

I'll pose an easy one this time.  Everyone should be familiar with the Fibonacci sequence defined recursively as F(n) = F(n-1) + F(n-2).  Fibonacci is often one of the first examples of recursion one learns, and also one of the first examples of how recursion can be harmful.  For this problem, I'm going to generalize Fibonacci sequence to allow it to be defined in terms of an arbitrary number of previous n terms:

Definition:  Let n be a positive integer and let a_0, a_1, a_n-1 be arbitrary integers.  We defined the Generalized Fibonacci Sequence of these constants as follows

G(0) = a_0
G(1) = a_1
   ...
G(n-1) = a_n-1

G(m) = G(m-1) + G(m-2) + ... + G(m-n)               For any m >= n

The regular Fibonacci sequence can be expressed in terms of G if n =2, a_0 = 0, and a_1 = 1.  Now given some Generalized Fibonacci Sequence G, consider what happens if we limit this to integers modulo m, for some number m:

G_m(l) = G(l) (modulo m)

Show that the sequence of numbers G_m(0), G_m(1), G_m(2), ... is eventually cyclic.  i.e. if you walk down the sequence far enough it falls into a steady pattern that repeats regularly.  What can you say about the period of the cycle in terms of m, n, a_0, a_1, ..., a_n?

Published Wednesday, December 21, 2005 12:54 PM by ReuvenLax
Filed under:

Comments

No Comments
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker