Implement a function that returns (or prints) a Fibonacci sequence. The function will receive two integers, an index (idx) and the number of results (N). The function should return the Fibonacci sequence starting from the idx and up to N results. Example: The Fibonacci sequence is as follows: 0, 1, 1, 2, 3, 5, 8, 13, ... The sequence is supposed to be viewed as an array, so if index 6 was provided, calculations should start from number 8. Suppose index 3 is provided and 3 results must be returned. The result should be: 2, 3, 5.
Check out your Company Bowl for anonymous work chats.