Digital Fibonacci

Find the last digit of the 123456789-th Fibonacci number.


The answer is 4.

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.

3 solutions

Danish Ahmed
Jul 17, 2015

If we start writing down the last digits of the Fibonacci num- bers, we notice that they repeat in cycles of length sixty. Since 123456789 = 60 ( 2057613 ) + 9 123456789 = 60(2057613) + 9 , the last digit of the 123456789 123456789 th Fibonacci number is the last digit of the 9th Fibonacci number, or 4 4 .

Moderator note:

This is known as the Pisano Period when n = 10 n=10 . The trouble with this approach is that if you don't have the knowledge of Pisano Period, then you need to tediously write out the first 60 terms before spotting a term.

Bonus question : What is the Pisano Period when n = 100 n=100 ?

You wrote more than 60 Fibonacci numbers?

Adarsh Kumar - 5 years, 11 months ago

Log in to reply

Every last digit of a fibonacci number repeats in cycle of 60.

samuel ayinde - 5 years, 11 months ago

Well, I knew the fact!

Pranjal Jain - 5 years, 11 months ago

I didn't know that, I had to write out 63 Fibonacci numbers.

Kevin Li - 5 years, 11 months ago

Yeah, Pisano Period is the answer. I like it. Nice problem!

Kartik Sharma - 5 years, 8 months ago
Sean Sullivan
Jul 19, 2015

Writing down the first 10 10 fibonacci numbers we get 1 , 1 , 2 , 3 , 0 , 3 , 3 , 1 , 4 , 0... m o d 5 1,1,2,3,0,3,3,1,4,0...\mod 5 . The next two numbers would be 4 4 and then 4 4 again which we can write as or 1 , 1 m o d 5 -1,-1\mod5 which would lead to the repetition of the above sequence but negative, and the next ten digits would be the negative of those digits, or just the original 10 10 digits, so the fibonacci sequence, m o d 5 \mod5 , repeats every 20 20 numbers,

123456789 9 m o d 20 123456789\equiv9 \mod 20

So F 123456789 F 9 4 m o d 5 F_{123456789}\equiv F_{9}\equiv4 \mod5

The fibonacci sequence is 1 , 1 , 0 , 1 , 1 , 0 , . . . m o d 2 1,1,0,1,1,0,...\mod2 repeating every 3 3 ,

since 123456789 0 3 m o d 3 123456789\equiv0\equiv3 \mod 3

we have F 123456789 F 3 0 m o d 2 F_{123456789}\equiv F_{3}\equiv0 \mod 2

Knowing F 123456789 4 m o d 5 F_{123456789}\equiv4 \mod 5 and F 123456789 0 m o d 2 F_{123456789}\equiv0 \mod 2 ,

the CRT gives F 123456789 4 m o d 10 F_{123456789}\equiv\boxed{4}\mod 10

Moderator note:

Yes. This is the solution I'm looking for. Note that you don't necessarily need to invoke CRT. Nice work!

Shishir Shahi
Jun 22, 2017

We can just observe the patterns through the list of fibonacci numbers. As the unit digit 0 appears in cycles of 15. Also if we divide 123456789 by 15 we get a remainder of 9. Then we can observe the patterns of the digits of Fibonacci numbers that are in a cycle of like 9,15+9,15+9+9,........(in fibonacci numbers).Then we can get a pattern of like 8,1,9,4,8,6,2,4,8,6,2,4.........(as the pattern of 8,6,2,4 continues).Thus we divide 12345679 by 60 and then we can observe the remainder which is 9 and thus we put the digit of the 9th fibonacci number.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...