I have a function that checks Fibonacci numbers for even. I need it to output a specified number of even numbers Example input: 4 Example output: 0 2 8 34 Answer You could just go over the even ones directly: Consider two adjacent Fibonacci numbers a and b (initially 1 and 0) and what happens when you shift the window: