a question in generating function

43 Views Asked by At

I can't understand why when we define $g(x)=f(x)-x^2$ which $f(x)={1\over1-x}$, why $g(x)$ can generate the $\{1,1,0,1,1,...\}$ ?

thanks

2

There are 2 best solutions below

0
On BEST ANSWER

Note that $$ f(x)=\frac{1}{1-x}=1+x+x^2+x^3+\cdots $$ So $$ g(x)=f(x)-x^2=1+x+x^3+\cdots $$ by subtracting the $x^2$ from the series for $f$. The coefficents of $g$ are now $\{1,1,0,1, 1,\ldots\}$

0
On

Because $$f(x)=\sum_{n=0}^{\infty}x^n$$ when subtracting $x^2$ from $f$ you get the sum $$\sum_{n\ne 2}^{\infty}x^n$$ Which has coefficients $1$ in all places of the sequence except the third.