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.
5
0, 1, 1, 2, 3