Generate Fibonacci Series for the First 1000 Values
What is the fibonacci sequence
The Fibonacci sequence is a series of numbers where the next number is the sum of previous two numbers.
- Fibonacci sequence formula : fn = f(n-1)+f(n-2)
- The first two numbers of the Fibonacci series is 0 followed by 1.
- 0 1 1 2 3 5 8 13 21 34 …..
So we will try to find an answer to Fibonacci in till 1000th value.
Here is the script which will generate first 1001 value of the Fibonacci series.
You can always write Fibonacci series by writing cursor where you add previous values to the next value, however, that solution is very expensive and takes pretty long time to execute. Using the script which I have demonstrated, you will get the results pretty quickly.
Please watch my previous post Logical Questions in that post I have written Factorial, Fibonacci, Palindrome and etc using C# language.