The (Fibonacci sequence) is a non-decreasing sequence of numbers:
0, 1, 1, 2, 3, 5, 8, 13, 21, …
Non-Fibonacci numbers are the integers that do not appear in the Fibonacci sequence. These numbers fill the gaps between consecutive Fibonacci numbers:
4, 6, 7, 9, 10, 11, 12, 14, …
Task
Write an infinite generator that produces a sequence of non-Fibonacci numbers. The input is a number N, which specifies how many non-Fibonacci numbers should be printed. Each number should appear on a new line.
Non-Fibonacci Numbers Generator
The (Fibonacci sequence) is a non-decreasing sequence of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, …
Non-Fibonacci numbers are the integers that do not appear in the Fibonacci sequence. These numbers fill the gaps between consecutive Fibonacci numbers: 4, 6, 7, 9, 10, 11, 12, 14, …
Task
Write an infinite generator that produces a sequence of non-Fibonacci numbers. The input is a number
N
, which specifies how many non-Fibonacci numbers should be printed. Each number should appear on a new line.Example
Input: 5
Output: 4 6 7 9 10