2

I want to show the Fibonacci numbers are cyclic in mod n. I have tried some small values for n and I can see this is the same. In terms of a proof, I'm thinking of using the pigeonhole principle of pair of adjacent Fibonacci numbers but I think I'm going in the wrong direction.....any help will be appreciated.

Many Thanks.

WhizKid
  • 857
  • 1
    The pigeonhole principle is a good idea. It works! But you'll want to argue separately that if some pair recurs then (1,1) also must recur. – lulu Jul 30 '15 at 00:53
  • @lulu ok thanks for letting me know it works. I'm afraid I'm not quite on grips with the whole recur thing. – WhizKid Jul 30 '15 at 01:16
  • This question has been asked and answered many times on our site. I picked that particular instance, because it contains highly upvoted general answers that handle (in spite of the title of the question) the general modulus (not just $3$). Shame on veterans not looking for a duplicate! – Jyrki Lahtonen Jul 30 '15 at 09:03

2 Answers2

2

Denoting $f_k:=F_k\bmod n$, you obviously have $$f_{k+2}=(f_{k+1}+f_k)\bmod n=\phi(f_{k+1},f_k).$$

As the $f_k$ take at most $n$ different values, after at most $n^2$ steps you have exhausted all possible pairs and the iterations must cycle.

For example, with $n=3$ the sequence is

$$0,1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1\cdots$$

The function $\phi$ corresponds to the finite table

$$\begin{array}{ccc} &\textbf0 & \textbf1 & \textbf2 \\ \textbf0&0 & 1 & 2 \\ \textbf1&1 & 2 & 0 \\ \textbf2&2 & 0 & 1 \end{array}$$

where the entry $\phi(0,0)$ is never used.

enter image description here

It can be shown that in fact the length of the period never exceeds $6n$.

  • Nice observation +1. I presume that in two dimensions, the elements of the cayley table above are isomorphic to group $D_{3}$ the symmetry group of an equilateral triangle? – Autolatry Jul 30 '15 at 08:22
  • 1
    @Autolatry: yep, this is just addition modulo $n$, so it generalizes to the symmetry of regular $n$-gons. –  Jul 30 '15 at 08:40
  • Perfect! Then this question has a richer fabric to it then was obvious to me at the outset. Many thanks. – Autolatry Jul 30 '15 at 08:42
  • 1
    @Autolatry: have a look a the Pisano Period problem. –  Jul 30 '15 at 08:44
  • Beautiful, I had no idea of such a construction. Many thanks Yves! – Autolatry Jul 30 '15 at 08:49
1

Consider the pairs $u_k=(F_{k+1} \bmod n, F_{k} \bmod n) \in M \times M$, where $M = \{ 0, 1, \dots, m-1 \}$.

Since $M \times M$ is finite (it has $m^2$ elements), it is clear that the sequence $u_k$ is preperiodic, that is, $u_{r+p}=u_r$ for some $r \ge 0$ and $p>0$. In other words, $u_k$ repeats with period $p$ after $k=r$.

To prove that $u_k$ is periodic you'll need to argue that $r=0$ works.

lhf
  • 216,483
  • I should mention, I haven't come across groups yet so this proof is beyond me for now. I've been told my pigeonhole idea does work so I would prefer insight via that method as that is something I'm likely to understand. Thanks. I will upvote anyways. – WhizKid Jul 30 '15 at 01:28
  • @WhizKid, my argument does not use groups. I'll change the notation. – lhf Jul 30 '15 at 01:29