The exact value of $\sum_{n=1}^{\infty}\frac{n^2+n+1}{3^n}$

What is the value of :

$$\sum_{n=1}^{\infty}\frac{n^2+n+1}{3^n}$$

-
I don't understand what's with this fashion in downvoting people. Is it a good thing to downvote a new person? What's the reason in that? (+1) – OFFSHARING Sep 22 '12 at 11:21
It would be helpful if you provided some reason for asking this, and your attempts so far. If it is homework, you should tag it as such. – Jakub Konieczny Sep 22 '12 at 11:22
@Chris'ssister: My guess is that it's because this kind of question has been asked many times before on this site, and the answer could have been found by a bit of searching. – Hans Lundmark Sep 22 '12 at 20:47
For example here: math.stackexchange.com/questions/30732/… – Hans Lundmark Sep 22 '12 at 20:48

You have for $|x|<1$

$$\sum_{k=0}^\infty x^k=\frac{1}{1-x}$$

$$\sum_{k=0}^\infty kx^k=x\cdot \left(\frac{1}{1-x}\right )'$$

$$\sum_{k=0}^\infty k^2x^k=x \cdot \left( x \cdot \left( \frac{1}{1-x}\right )'\right )'$$

Replace $x$ with $1/3$ and you will get the result.

-

HINT: you may use $e^{kx}$. Then solve the geometrical progression, derive once/twice its both sides and then plug in $x=-\ln(3)$.

-

I don't know the exact steps of how to get that, but i figured out that this comes out to be $\frac 11+\frac 79+\frac {15}{27}+\ldots$

and this link here, gives the solution to be $\frac {11}4$. Refer WolframAlpha Solution.

-

In most practical applications, you can just ask Mathematica, and it will tell you it's $\frac{11}{4}$.

If you want to arrive at the formula in a more rigorous way, you can do the following:

Consider the function $f$: $$f(x) = \frac{1}{1 - x} = \sum_{n=0}^\infty x^n$$

An initial observation is that $f(\frac{1}{3}) = \sum_{n=0}^\infty \frac{1}{3^n}$ so it looks a little like your sum. Now, consider $f'$: $$f'(x) = \frac{1}{(1 - x)^2} = \sum_{n=1}^\infty n x^{n-1} = \sum_{n=0}^\infty (n+1) x^{n}$$

When you plug in $\frac{1}{3}$ again, you find $f'(\frac{1}{3}) = \sum_{n=0}^\infty \frac{n+1}{3^n}$. Finally, consider $f''$: $$f''(x) = \frac{2}{(1 - x)^3} = \sum_{n=0}^\infty (n+2)(n+1) x^{n} = \sum_{n=0}^\infty (n^2 + 3n + 2) x^{n}$$ When you plug in $\frac{1}{3}$ once more, you find $f''(\frac{1}{3}) = \sum_{n=0}^\infty \frac{n^2 + 3n + 2}{3^n}$. Now, all you have to do is to express $n^2 + n +1$ as: $$n^2 + n + 1 = (n^2 + 3n + 1) - 2 (n+1) + 1$$ so you get that the sought sum $S$ is: $$S = f''\left(\frac{1}{3}\right) - 2 f'\left(\frac{1}{3}\right) - f\left(\frac{1}{3}\right)$$ The remaining computation is not pleasant, but it is definitely doable, and does not involve any new creative ideas.

I was a little too careless: the computation I did was for a sum raging from $n=0$ rather than $n=1$ as in the problem. It is however easy to mend - just subtract the initial term, which is just $\frac{1}{3}$.

-