Find the last digit of the 123456789-th Fibonacci number.
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.
This is known as the Pisano Period when n = 1 0 . 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 = 1 0 0 ?
You wrote more than 60 Fibonacci numbers?
Log in to reply
Every last digit of a fibonacci number repeats in cycle of 60.
Well, I knew the fact!
I didn't know that, I had to write out 63 Fibonacci numbers.
Yeah, Pisano Period is the answer. I like it. Nice problem!
Writing down the first 1 0 fibonacci numbers we get 1 , 1 , 2 , 3 , 0 , 3 , 3 , 1 , 4 , 0 . . . m o d 5 . The next two numbers would be 4 and then 4 again which we can write as or − 1 , − 1 m o d 5 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 1 0 digits, so the fibonacci sequence, m o d 5 , repeats every 2 0 numbers,
1 2 3 4 5 6 7 8 9 ≡ 9 m o d 2 0
So F 1 2 3 4 5 6 7 8 9 ≡ F 9 ≡ 4 m o d 5
The fibonacci sequence is 1 , 1 , 0 , 1 , 1 , 0 , . . . m o d 2 repeating every 3 ,
since 1 2 3 4 5 6 7 8 9 ≡ 0 ≡ 3 m o d 3
we have F 1 2 3 4 5 6 7 8 9 ≡ F 3 ≡ 0 m o d 2
Knowing F 1 2 3 4 5 6 7 8 9 ≡ 4 m o d 5 and F 1 2 3 4 5 6 7 8 9 ≡ 0 m o d 2 ,
the CRT gives F 1 2 3 4 5 6 7 8 9 ≡ 4 m o d 1 0
Yes. This is the solution I'm looking for. Note that you don't necessarily need to invoke CRT. Nice work!
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.
Problem Loading...
Note Loading...
Set Loading...
If we start writing down the last digits of the Fibonacci num- bers, we notice that they repeat in cycles of length sixty. Since 1 2 3 4 5 6 7 8 9 = 6 0 ( 2 0 5 7 6 1 3 ) + 9 , the last digit of the 1 2 3 4 5 6 7 8 9 th Fibonacci number is the last digit of the 9th Fibonacci number, or 4 .