Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 430 Bytes

Fibonacci.md

File metadata and controls

17 lines (10 loc) · 430 Bytes

Fibonacci Sequence

The Fibonacci sequence is constructed by adding the last two numbers of the sequence so far to get the next number in the sequence. The first and second numbers of the sequence are defined as 0 and 1.

0, 1, 1, 2, 3, 5, 8, 13, 21…

Write a function to generate the Fibonacci sequence to a specific place without using a loop.

Example Input

5

Example Output

0, 1, 1, 2, 3