Fibonacci sequence modulo 10

Find the smallest k k for which the following statement is always true for n 1 n \geq 1 :

F n 0 ( m o d 10 ) F n + k 0 ( m o d 10 ) F_{n} \equiv 0 \ (mod \ 10) \iff F_{n+k} \equiv 0 \ (mod \ 10)

Where F 1 = 1 , F 2 = 1 F_{1}=1, \ F_{2}=1 and F n = F n 1 + F n 2 F_{n}=F_{n-1}+F_{n-2}


The answer is 15.

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.

4 solutions

K T
Jan 4, 2019

Suppose F n 0 F_n\equiv 0 and F n + 1 x F_{n+1}\equiv x , and x coprime to 10, then we get the following terms by calculating (mod 10):

F n 0 F_n\equiv0
F n + 1 x F_{n+1}\equiv x
F n + 2 x F_{n+2}\equiv x
F n + 3 2 x F_{n+3}\equiv2x
F n + 4 3 x F_{n+4}\equiv3x
F n + 5 5 x F_{n+5}\equiv5x
F n + 6 8 x F_{n+6}\equiv8x
F n + 7 3 x F_{n+7}\equiv3x
F n + 8 x F_{n+8}\equiv x
F n + 9 4 x F_{n+9}\equiv4x
F n + 10 5 x F_{n+10}\equiv5x
F n + 11 9 x F_{n+11}\equiv9x
F n + 12 4 x F_{n+12}\equiv4x
F n + 13 3 x F_{n+13}\equiv3x
F n + 14 7 x F_{n+14}\equiv7x
F n + 15 0 F_{n+15}\equiv0

So we observe that the first term after F n F_n that is 0 (mod 10) is F n + 15 F_{n+15} . Since 7 x 7x is also coprime to 10 10 , we could repeat the same the argument by induction, so that 0 occurs exactly every 15th term. The initial condition is F 0 = 0 F_0=0 and F 1 = 1 F_1=1 , so right from the start this pattern emerges, so that 10 F n 15 n 10|F_n \Leftrightarrow 15|n , from which it follows that k=15.

Geoff Pilling
Jan 3, 2019

If we write down the first few terms we see that:

  • F 0 0 F_{0} \equiv 0
  • F 15 0 F_{15} \equiv 0
  • F 30 0 F_{30} \equiv 0
  • F 45 0 F_{45} \equiv 0
  • F 60 0 F_{60} \equiv 0

And at this point the series repeats, therefore the pattern will continue, and since 15 is the also the first positive n n for which F n 0 F_{n} \equiv 0 , then the answer is 15 15 .

Jacopo Piccione
Dec 31, 2018

For hypothesis we have F n 0 ( m o d 10 ) F_{n}\equiv 0\; (mod\; 10) . Let's see how it works for next terms.

F n + 1 = F n + F n 1 F n 1 ( m o d 10 ) F_{n+1}=F_n+F_{n-1}\equiv F_{n-1}\;(mod\;10)

F n + 2 = F n + 1 + F n F n 1 ( m o d 10 ) F_{n+2}=F_{n+1}+F_n\equiv F_{n-1}\;(mod\;10)

F n + 3 = F n + 2 + F n + 1 2 F n 1 ( m o d 10 ) F_{n+3}=F_{n+2}+F_{n+1}\equiv 2F_{n-1}\;(mod\;10)

It seems that F n + k F k F n 1 ( m o d 10 ) F_{n+k}\equiv F_k\cdot F_{n-1}\;(mod\;10) ... Let's prove it by strong induction on k k .

Base case: we have just calculated F n F_n and F n + 1 F_{n+1} ; thesis holds for both of them.

Induction step:

F n + k + 1 = F n + k + F n + k 1 F_{n+k+1}=F_{n+k}+F_{n+k-1} for definition

F k F n 1 + F k 1 F n 1 \equiv F_{k}\cdot F_{n-1}+F_{k-1}\cdot F_{n-1} for inductive hypothesis

= ( F k + F k 1 ) F n 1 =(F_k+F_{k-1})\cdot F_{n-1}

= F k + 1 F n 1 =F_{k+1}\cdot F_{n-1} for definition.

Therefore F n + k F k F n 1 ( m o d 10 ) F_{n+k}\equiv F_k\cdot F_{n-1}\;(mod\;10) for strong induction on k k .

In general it's NOT true that a b 0 ( m o d m ) a 0 ( m o d m ) b 0 ( m o d m ) ab\equiv 0 \;(mod\; m) \Rightarrow a\equiv 0 \; (mod\; m) \lor b\equiv 0 \; (mod\; m) . But, since the problem's thesis must holds for all n n satisfying F n 0 ( m o d 10 ) F_n\equiv 0 \; (mod\; 10) , it has to be F k 0 ( m o d 10 ) F_k\equiv 0 \; (mod\; 10) in order to have F n + k 0 ( m o d 10 ) F_{n+k}\equiv 0 \; (mod \; 10) .

With simple calculations we find out that m i n { k N : F k 0 ( m o d 10 ) } = 15 min\{k\in \mathbb{N}:\; F_k\equiv 0 \; (mod\; 10)\}=\boxed{15} .

Robert Szafarczyk
Dec 29, 2018

By writing this sequence down modulo 10 we can see that we start with 1, 1 and eventually get to 1, 1 again. This means it cycles (only two previous numbers influence the next number). We can also see that between every pair of neighbouring 0s there are 14 numbers therefore the answer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...