Fibonacci

Algebra Level 5

Let F n = F n 1 + F n 2 F_n = F_{n-1}+ F_{n-2} be the n n th Fibonacci number ( n > 0 ) n>0) , where F 1 = 1 F_1=1 and F 2 = 1 F_2=1 . Find the smallest F n F_n such that 1000 F n 1 000 \mid F_n . Give n n as the answer.

Bonus: How many digits this F n F_n has?


The answer is 750.

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

Alex Li
May 4, 2017

Solution with Java java public class FibonnacciDivider { public static void main(String[] args) { int n = 2; int last = 1; //F1 int current = 1; //F2 while (current%1000 != 0) { n++; //get the next number int temp = current%1000; current = (last + current)%1000; last = temp; } System.out.println(n); } } (how do I fix the text... until then just take this)

I feel this should be labelled as a computer science problem if there's no feasible way to do it without something equivalent to programming.

Joe Mansley - 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...