3

It is not too difficult to show that the Fibonacci numbers mod $b$ form a periodic sequence. I would like to say something interesting about the period.

There is a small shortcut to the brute-force technique that we can take: if $z(b)$ is the smallest index for which $F_{z(b)}=0$ mod $b$, it follows immediately that $F_{z(b)-1}=F_{z(b)+1}=F_{z(b)+2}$. If we define this number to be $\sigma$, then we find a sort of "pseudo-periodicity" $$F_n=\sigma F_{n+z(b)}$$

From there we can find the true period by finding the smallest power $p$ such that $\sigma^p=1$, which gives the true period: $p\cdot z(b)$.

Have the properties of $z(b)$ been studied before? Is there some analysis much simpler than this for calculating the period?

EDIT: OEIS shows that $p\in\{1,2,4\}$ up to $b=1000$; that doesn't seem obvious to me.

Eric Stucky
  • 12,758
  • 3
  • 38
  • 69

1 Answers1

3

Even for b = p, a prime, it isn't straight forward.

To handle the prime case, Note that for p ≠ 5 the characteristic equation $\lambda^2-\lambda-1=0$ is either irreducible or has two roots mod (p) (the discriminant is 5, so for p = 5 you get a double root). If there are two roots mod p, R and S, then the Fibonacci numbers mod p are of the form $$F_n=A\,R^n + (1-A)\,S^n\;\;\;\;mod\,(p)$$. where A(R-S)=1-S mod(p). In this case, to get the period you seek you compute o(R) and o(S), the respective orders mod (p) and the period is the lcm of these. The computation in the irreducible case is similar, only now the roots live in a quadratic extension of $\frac{\mathbb Z}{p\mathbb Z}$ . Quadratic reciprocity lets you decide which case holds for which primes p (two roots if p is 1 or 4 mod 5, irreducible otherwise), but so far as I can tell the orders of R and S follow no particularly clear pattern. But I haven't looked very hard at that.

lulu
  • 70,402