Shell Script to Generate Fibonacci Series Iteratively and Recursively
By Fahad Ahammed
- One minute read - 77 wordsBy definition, the first two Fibonacci numbers are 0 and 1, and each subsequent number is the sum of the previous two. I will show you two shell script to generate Fibonacci series recursively and iteratively. Also you will get idea about the application of Fibonacci series/numbers.
In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation Fn = Fn-1 + Fn-2, with seed values F0 = 0 and F1 = 1.