# Find a generating function for the infinite series: $1, 2, 1, 1, 1, 1, 1$

From what I understand, there cannot be a generating function for the series $1, 2, 1, 1, 1, 1$, and I have not managed to find any examples of similar generating functions. However, I am expected to find one.

How can it be possible to modify the generating function $(\frac{x} {(1-x)})$such that only the n=1st term is increased by $1$? It does not seem possible.

## 1 Answer

Just use $$\frac{x}{1-x}+x^2$$

• Sorry, I don't understand. I am guessing that x^2 is the generating function for 0, 1, 0, 0, 0, 0... but I am unable to find anything explaining why that might be the case. – Daniel Paczuski Bak Mar 15 '17 at 12:34
• The expansion is $x+2x^2+x^3+x^4+x^5+\cdots$. Isn't that what you want ? Your function generates only ones. If we add $x^2$, we only change the second entry, so we have generated $1,2,1,1,1,1,1,\cdots$. The term $x^2$ generates only one $1$, but we can formally say that it generates $0,1,0,0,0,0,0\cdots$ because we have $x^2=0\cdot x+1\cdot x^2+0\cdot x^3+0\cdot x^4+\cdots$ , so we only have to take the sum. – Peter Mar 15 '17 at 12:36
• Your answer just makes it clear to me that I don't understand this at all, lol. Thanks. – Daniel Paczuski Bak Mar 15 '17 at 12:38
• @DanielPaczuskiBak What is unclear ? The concept of formal power series ? Or why $x^2$ can be interpreted as a formal power series ? – Peter Mar 15 '17 at 12:42
• How does one generate a series given a function? – Daniel Paczuski Bak Mar 15 '17 at 12:49