Generating function for sequence

70 Views Asked by At

I just need confirmation on whether I am approaching this question correctly.I am not sure how to simply $\sum nx^n$ though. Would it be $\frac{6x}{(1-x)^2} ?$

Find the generating function for: $$ a_n = 6n + 2018 $$

My solution: $$ \sum a_nx^n = \sum6nx^n+ \sum2018x^n $$ $$\sum a_nx^n = \sum6nx^n+ \sum2018x^n$$ $$ g_{an}(x) = 6\sum nx^n+ 2018\sum x^n + a_0$$ $$ g_{an}(x) = \frac{6x}{(1-x)^2}+ \frac{2018}{1-x} $$

Any guidance would be greatly appreciated.

1

There are 1 best solutions below

1
On BEST ANSWER

You are correct that $\sum nx^n=x/(1-x)^2$. Here's how you derive this. Starting from $1/(1-x) = \sum_n x^n$, differentiate both sides, obtaining $$ \frac1{(1-x)^2}=\sum nx^{n-1}, $$ then multiply both sides by $x$.


By the way, you shouldn't subtract $a_0$ from the left hand side, the correct equation is $$ \sum a_nx^n = \sum 6nx^n + \sum2018 x^n $$ The only time you subtract $a_0$ is when you have a recurrence equation, like $a_{n+1} = 2a_n +1$.