201k views
0 votes
Find a generating function for the sequence of squares: g(x) = P∞ n=0 n 2x n . Then for fun, as above evaluate your expression g(1/100) or g(1/1000) to get a fraction that contains the squares in its decimal expansion.

1 Answer

2 votes

The sequence of squares,
\{n^2\}_(n\ge0), has generating function


g(x)=\displaystyle\sum_(n=0)^\infty n^2x^n

Recall that for
|x|<1,


f(x)=\frac1{1-x}=\displaystyle\sum_(n=0)^\infty x^n

Taking the derivative, we have


f'(x)=\frac1{(1-x)^2}=\displaystyle\sum_(n=0)^\infty nx^(n-1)=\frac1x\sum_(n=0)^\infty nx^n

and taking the derivative again, we have


f''(x)=\frac2{(1-x)^3}=\displaystyle\frac1x\sum_(n=0)^\infty n^2x^(n-1)-\frac1{x^2}\sum_(n=0)^\infty nx^n


f''(x)=\frac2{(1-x)^3}=\displaystyle\frac1{x^2}\left(\sum_(n=0)^\infty n^2x^n-\sum_(n=0)^\infty nx^n\right)

From this we can get an expression for
g(x) in terms of the derivatives of
f(x):


f''(x)=(g(x)-xf'(x))/(x^2)


\implies g(x)=x^2f''(x)+xf'(x)


\implies g(x)=(2x^2)/((1-x)^3)+\frac x{(1-x)^2}


\implies\boxed{g(x)=(x^2+x)/((1-x)^3)}

Then


g\left(\frac1{100}\right)=(10,100)/(970,299)\approx0.\underline{01}\,\underline{04}\,\underline{09}\,\underline{16}\ldots


g\left(\frac1{1000}\right)=(1,001,000)/(997,002,999)\approx0.\underline{001}\,\underline{004}\,\underline{009}\,\underline{016}\ldots

User Kweerious
by
6.2k points