Is there a formula for $\sum_{i=0}^n a^i*i$? I know there is one for simply $\sum_{i=0}^n a^i$ and I was digging for properties involving multiplication within the summation but so far there is the constant that you can bring outside of summation. Note n here is finite. If the formula doesn't exist I would like to know how to evaluate it.
-
Possible duplicate of How can I evaluate $\sum_{n=0}^\infty (n+1)x^n$ – Micah Feb 19 '17 at 05:19
-
(Or possibly of some question that specifically asks about the finite sum, but that's the one I know how to find and pretty much all of the answers either explicitly cover the finite sum as well or can be easily modified to do so.) – Micah Feb 19 '17 at 05:21
-
I need the one for finite sum – 夢のの夢 Feb 19 '17 at 05:23
3 Answers
An elementary way.
Let $s(n) =\sum_{i=0}^n a^i $ and $t(n) =\sum_{i=0}^n ia^i $.
By the usual methods, we have $s(n) =\dfrac{a^{n+1}-1}{a-1} $.
Since multiplying $s(n)$ by $a-1$ makes the result nice, let's try it with $t(n)$.
$\begin{array}\\ (a-1)t(n) &=(a-1)\sum_{i=0}^n ia^i\\ &=a\sum_{i=0}^n ia^i-\sum_{i=0}^n ia^i\\ &=\sum_{i=0}^n ia^{i+1}-\sum_{i=1}^n ia^i \qquad\text{since the term with }i=0\text{ is zero}\\ &=\sum_{i=1}^{n+1} (i-1)a^{i}-\sum_{i=1}^n ia^i\\ &=\sum_{i=1}^{n} (i-1)a^{i}+na^{n+1}-\sum_{i=1}^n ia^i\\ &=\sum_{i=1}^{n} ((i-1)-i)a^{i}+na^{n+1}\\ &=-\sum_{i=1}^{n} a^{i}+na^{n+1}\\ &=-(s(n)-1)+na^{n+1}\\ &=na^{n+1}+1-\dfrac{a^{n+1}-1}{a-1}\\ \text{so}\\ t(n) &=\dfrac{na^{n+1}+1}{a-1}-\dfrac{a^{n+1}-1}{(a-1)^2}\\ &=\dfrac{(a-1)(na^{n+1}+1)-(a^{n+1}-1)}{(a-1)^2}\\ &=\dfrac{na^{n+2}-na^{n+1}+a-1-(a^{n+1}-1)}{(a-1)^2}\\ &=\dfrac{na^{n+2}-(n+1)a^{n+1}+a}{(a-1)^2}\\ &=\dfrac{a(na^{n+1}-(n+1)a^{n}+1)}{(a-1)^2}\\ \end{array} $
This reduction in exponent by multiplying by $a-1$ works for any exponent.
Let $s_k(n) =\sum_{i=0}^n i^ka^i $.
Then, if $k \ge 2$, using the binomial theorem,
$\begin{array}\\ (a-1)s_{k}(n) &=(a-1)\sum_{i=0}^n i^ka^i\\ &=a\sum_{i=0}^n i^ka^i-\sum_{i=0}^n i^ka^i\\ &=\sum_{i=0}^n i^ka^{i+1}-\sum_{i=1}^n i^ka^i\\ &=\sum_{i=1}^{n+1} (i-1)^ka^{i}-\sum_{i=1}^n i^ka^i\\ &=\sum_{i=1}^{n} (i-1)^ka^{i}+n^{k}a^{n+1}-\sum_{i=1}^n i^ka^i\\ &=n^{k}a^{n+1}-\sum_{i=1}^n (i^k-(i-1)^k)a^i\\ &=n^{k}a^{n+1}-\sum_{i=1}^n (i^k-\sum_{j=0}^k \binom{k}{j}i^j(-1)^{k-j})a^i\\ &=n^{k}a^{n+1}+\sum_{i=1}^n \sum_{j=0}^{k-1} \binom{k}{j}i^j(-1)^{k-j})a^i\\ &=n^{k}a^{n+1}+\sum_{j=0}^{k-1} \binom{k}{j}(-1)^{k-j}\sum_{i=1}^n i^ja^i\\ &=n^{k}a^{n+1}+\sum_{j=0}^{k-1} \binom{k}{j}(-1)^{k-j}s_j(n)-(-1)^{k}\\ \end{array} $
That last $(-1)^k$ is due to the $s_0(n)$ having a constant $1$ while all the others do not.

- 107,799
Hint
Consider $f:a\mapsto\sum_{i=0}^na^i$, compute its derivative and then multiply the result par $a$.

- 7,515
- 10
- 26
$$ \begin{align} \sum_{i=0}^n ia^i & = \sum_{i=1}^n\sum_{k=i}^n a^i \\[10pt] & =\sum_{i=1}^n\sum_{k=1}^n a^i - \sum_{i=1}^n\sum_{k=1}^{i-1} a^i \\[10pt] & = \frac{n(a^{n+1}-a)}{a-1} - \sum_{i=1}^n\frac{a^i-a}{a-1} \\[10pt] & = \frac{n(a^{n+1}-a)}{a-1} - \frac{a^{n+1}-a}{(a-1)^2} + \frac{an}{a-1} \\[10pt] & = \frac{na^{n+1}(a-1)-a^{n+1}+a}{(a-1)^2} \\[10pt] & = \frac{na^{n+2} -(n+1)a^{n+1} +a}{(a-1)^2} \end{align}$$

- 18,040
-
On the first line, why does the inner sum go from $i$ to $n$. Shouldn't it go from $1$ to $i$? – marty cohen Feb 19 '17 at 18:03