Periodic Fibonacci

Consider the construction of a new sequence S S by taking the Fibonacci sequence modulo 10.

The first few terms of S S are S = 0 , 1 , 1 , 2 , 3 , 5 , 8 , 3 , 1 , 4 , 5 , 9 , S = 0,1,1,2,3,5,8,3,1,4,5,9,\ldots .

Find the fundamental period of S S .

If S S is not period, enter your answer as -1.


The answer is 60.

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.

1 solution

Michael Mendrin
Feb 9, 2017

The is the Pisano number, π ( 10 ) = 60 \pi (10)=60 . See Fibonacc 0 0 ... for more about this.

For those of you who like coding :

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
int get pisano period( m) {   // m = 10

    int  a = 0, b = 1, c = a + b;

    for (int i = 0; i < m * m; i++) {

        c = (a + b) % m;

        a = b;

        b = c;

          if (a == 0 && b == 1) return i + 1;

    }
}

Ossama Ismail - 4 years, 4 months ago

Log in to reply

How many of us have doodled at school adding successive pairs of numbers while keeping only the last digit, wondering if it will never repeat?

1 , 1 , 2 , 3 , 5 , 8 , 3 , 1 , 4 , 5 , 9 , 4 , 3 , 7 , 0 , 7 , 7 , 4 , 1 , 5 , 6 , 1 , 7 , 1, 1, 2, 3, 5, 8, 3, 1, 4, 5, 9, 4, 3, 7, 0, 7, 7, 4, 1, 5, 6, 1, 7,
8 , 5 , 3 , 8 , 1 , 9 , 0 , 9 , 9 , 8 , 7 , 5 , 2 , 7 , 9 , 6 , 5 , 1 , 6 , 7 , 3 , 0 , 3 , 8, 5, 3, 8, 1, 9, 0, 9, 9, 8, 7, 5, 2, 7, 9, 6, 5, 1, 6, 7, 3, 0, 3, 3 , 6 , 9 , 5 , 4 , 9 , 3 , 2 , 5 , 7 , 2 , 9 , 1 , 0 , 1 , 1 , 2 , 3 , 5 3, 6, 9, 5, 4, 9, 3, 2, 5, 7, 2, 9, 1, 0, 1, 1, 2, 3, 5

but it did repeat, and then we wondered why?

Michael Mendrin - 4 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...