3

Find the generating function of the sequence $ a_n =\sum\limits_{k=0}^n k(k-1)$

My try:
Let's assume $k(k-1)$ is genereated by $F(x)$ then $a_n$ is generated by $\frac{F(x)}{1-x}$ (that's a common trick).

So have we reduced the problem to: Find the generating function of $a_k = k(k-1)$.

Now, there's another trick: If $G(x)$ generates $b_k$ then $x\cdot G'(x)$ generates $c_k = n\cdot b_k$

If so, we need to find the generating function of $c_k = k-1$.

I'm not sure I'm on the right path, can you help me with it?
Thanks!

Aharon
  • 323

2 Answers2

2

from your initial conditions, we have $$a_n=\sum_{k=0}^nk^2-\sum_{k=0}^nk\\ =\frac{n(n+1)(2n+1)}{6}-\frac{n(n+1)}{2}\\ =\frac{n(n+1)(n-1)}{3}$$ thus the generating function is $$G(a_n,x)=\frac{1}{3}\sum_{n=0}^\infty(n^3-n)x^n\\ =\frac{1}{3}\left[\sum_{n=0}^\infty n^3x^n-\sum_{n=0}^\infty nx^n\right]$$ other hand, we have $$<1,1,1,1...>=\frac{1}{1-x}\\ \Rightarrow<1,2,3,4...>=\frac{d}{dx}\frac{1}{1-x}=\frac{1}{(1-x)^2}\\ \Rightarrow<0,1,2,3...>=x\cdot\frac{1}{(1-x)^2}=\frac{x}{(1-x)^2}$$ so $\sum_{n=0}^\infty nx^n=\frac{x}{(1-x)^2}$. Then $$<1,4,9,16...>=\frac{d}{dx}\frac{x}{(1-x)^2}=\frac{1+x}{(1-x)^3}\\ \Rightarrow<0,1,4,9...>=x\cdot\frac{1+x}{(1-x)^3}=\frac{x(1+x)}{(1-x)^3}\\ \Rightarrow<1,2^3,3^3...>=\frac{d}{dx}\frac{x(1+x)}{(1-x)^3}=\frac{1+4x+x^2}{(1-x)^4}\\ \Rightarrow<0,1,2^3,3^3...>=x\cdot\frac{1+4x+x^2}{(1-x)^4}=\frac{x+4x^2+x^3}{(1-x)^4}$$ which means $\sum_{n=0}^\infty n^3x^n=\frac{x+4x^2+x^3}{(1-x)^4}$. So the result is $$G(a_n,x)=\frac{1}{3}\left[\frac{x+4x^2+x^3}{(1-x)^4}-\frac{x}{(1-x)^2}\right]\\ =\frac{1}{3}\frac{6x^2}{(1-x)^4}\\ =\frac{2x^2}{(1-x)^4}$$

Martial
  • 1,694
2

Here's another variation of the theme which follows your approach even somewhat closer.

We start with your common trick. Let \begin{align*} A(x)=\sum_{n\geq 0}a_nx^n \end{align*} Since \begin{align*} \frac{1}{1-x}A(x)=\sum_{k\geq 0}x^k\sum_{j\geq 0}a_jx^j=\sum_{n\geq 0}\left(\sum_{k=0}^{n}a_k\right)x^n \end{align*}

We observe that summing up sequence elements corresponds to multiplication of the generating function by $\frac{1}{1-x}$ \begin{align*} &(a_n)_{n\geq 0}&A(x)&=\sum_{n\geq 0}a_nx^n\\ &\tag{1}\\ &\left(\sum_{k=0}^{n}a_k\right)_{n\geq 0}&\frac{1}{1-x}A(x)&=\sum_{n\geq 0}\left(\sum_{k=0}^{n}a_k\right)x^n \end{align*}

Now we follow your other trick:

Derivation of the generating function gives

\begin{align*} &(a_n)_{n\geq 0}&A(x)&=\sum_{n\geq 0}a_nx^n\\ &\left(na_n\right)_{n\geq 0}&\left(x\text{D}\right)A(x)&=\sum_{n\geq 0}na_nx^n\tag{2}\\ &\big(n(n-1)a_n\big)_{n\geq 0}&\left(x^2\text{D}^2\right)A(x)&=\sum_{n\geq 0}n(n-1)a_nx^n \end{align*}

With the help of (1) and (2) we calculate

\begin{align*} \sum_{n\geq 0}&\left(\sum_{k=0}^{n}k(k-1)\right)x^n\\ &=\frac{1}{1-x}\sum_{n\geq 0}n(n-1)x^n\\ &=\frac{x^2}{1-x}\sum_{n\geq 0}n(n-1)x^{n-2}\\ &=\frac{x^2}{1-x}\cdot\text{D}^2\left(\frac{1}{1-x}\right)\\ &=\frac{x^2}{1-x}\cdot\text{D}\left(\frac{1}{(1-x)^2}\right)\\ &=\frac{2x^2}{(1-x)^4}\\ \end{align*}

Markus Scheuer
  • 108,315