In my textbook the following example is stated.
Let $f$ be the formal power series on $GF(2)$ defined by $$ f(X) = X + X^2 + X^4 + ... = \sum_{n\geq 0} X^{2^n} $$ This series is algebraic over $GF(2)$, since $$ f(X^2) = f(X)-X $$ which implies, over $GF(2)$, that $$ f(X)^2+f(X)+X=0 $$
(Here $GF(2)$ is a Galois field of two elements)
I understand the first step. The second step seems to imply $f(X^2) = f(X)^2$ (because $f(X) = -f(X)$), but this isn't obvious to me.
Trying to work out the steps in between I have the following: $$ f(X)f(X) = \left(\sum_{n\geq0} x^{2^n}\right)\left(\sum_{n\geq0} x^{2^n}\right)\\ \sum_{n\geq 0} \sum_{k=0}^n X^{2^k}X^{2^{n-k}} = \sum_{n\geq 0} \sum_{k=0}^n X^{2^k+2^{n-k}} $$
I don't see how you get from here to $f(X^2)$. Am I on the right track with this or am I completely missing something?