# What's wrong with my even Fibonacci generating function?

I'm trying to find the closed form for the generating function of an even Fibonacci series $$F_{2n}$$, but I'm not getting the right answer. My idea was to use the even Fibonacci series to find the odd Fibonacci series, then combine them. i.e. if

\begin{align} f(x) = f_0 + f_2x^2 + f_4x^4 + \dots \end{align} then \begin{align} x^2f(x) = f_0x^2 + f_2x^4 + \dots \end{align} so subtracting one from the other, \begin{align} (1 - x^2)f(x) &= f_0 + (f_2 - f_0)x^2 + (f_4 - f_2)x^4 + \dots \\ &= f_0 + f_1x^2 + f_3x^4 + \dots \\ \implies \frac{(1-x^2)f(x) - f_0}{x} &= f_1x + f_3x^3 + \dots \end{align} Then I add odd and even parts together (and putting $$f_0 = 1$$), \begin{align} \frac{(1-x^2)f(x) - 1}{x} + f(x) = f_0 + f_1x + f_2x^2 + f_3x^3 + \dots = \frac{x}{1-x-x^2} \end{align}

Then when I solve for $$f(x)$$ I get \begin{align} f(x) = \frac{1-x}{(1-x-x^2)(1+x-x^2)} \end{align} But when I chuck this in Mathematica it gives me $$1-x+3x^2-3x^3+8x^4-8x^5+21x^6-21x^7 + ...$$. What went wrong?

• I believe in your definition, we should have $f_0 = 0$ right? If so, check your calculations. Oct 14 '20 at 12:46
• Oh no! I always thought the 0th term was 1. I thought it was all the odd terms showing up in the Mathematica expansion but it was the even terms after all. That'll teach me to check my definitions. At least I'm somewhat glad most of working is valid. Thanks! Oct 14 '20 at 12:51

What Mathematica gives you indicates that you're close. The desired terms are repeated, and those repeats are because of the $$1-x$$ in the numerator, so the correct answer is $$\frac{x^2}{(1-x-x^2)(1+x-x^2)}=\frac{x^2}{1-3x^2+x^4}$$ where the $$x^2$$ shifts the series so $$F_0=0$$ is the $$x^0$$ coefficient.