We have the sum $$\sum_{k=0}^{n} a^k k,$$ where a is a constant and we need the answer in terms of $n$.
How can we go about solving this? If $a$ were a variable we could use differentiation with $\sum_{k=0}^{n} a^k$, but I don't think we can differentiate with respect to a constant.
For all $a \not =1$, $\sum\limits_{k=0}^{n} a^{k} = \frac{1-a^{n+1}}{1-a}$. Differentiate with respect to $a$, to get $\sum\limits_{k=1}^{n}k a^{k-1}= \frac{-(n+1)a^{n}(1-a)+(1-a^{n+1})}{(1-a)^{2}}$. The multiply both sides by $a$. If $a=1$, then the sum $\sum\limits_{k=1}^{n} 1^{k}k= \frac{n(n+1)}{2}$