0
$\begingroup$

I would like to compute the following sum with big values of n :

$$\sum_{i=1}^{n} i * 10^{i-1}$$

I'm wondering if there is a way to express it in a manner that is faster to evaluate.

In other words, can this sum be simplified?

$\endgroup$
  • $\begingroup$ Compute $\sum_{i=1}^n 10^i$ and differentiate both sides w.r.t. $10$. $\endgroup$ – StubbornAtom Sep 16 '16 at 12:34
  • $\begingroup$ @StubbornAtom you rather need to differentiate w.r.t. 10 ! $\endgroup$ – justt Sep 16 '16 at 12:36
  • $\begingroup$ @justt right you are. $\endgroup$ – StubbornAtom Sep 16 '16 at 12:37
  • $\begingroup$ Thank you for your helpful comment. $\endgroup$ – Cydonia7 Sep 16 '16 at 12:38
2
$\begingroup$

Hint

$$\sum_{k=0}^n x^k=\frac{1-x^{n+1}}{1-x}.$$

$\endgroup$
  • 1
    $\begingroup$ Thanks, that helped a lot! I did not think of using differentiation there. $\endgroup$ – Cydonia7 Sep 16 '16 at 12:37
1
$\begingroup$

$$\sum_{k=0}^n x^k=\frac{x^{n+1}-1}{x-1}.$$\

$$\sum_{k=0}^n kx^{k-1}=\frac{d}{dx}\frac{x^{n+1}-1}{x-1}=\frac{(n+1)x^n}{x-1}-\frac{x^{n+1}-1}{(x-1)^2}=\frac{nx^{n+1}-(n+1)x^n+1}{(x-1)^2}.$$

$\endgroup$
  • $\begingroup$ I think there is a sign mistake in the answer :) $\endgroup$ – Cydonia7 Sep 16 '16 at 12:46
  • $\begingroup$ thanks ! I corrected it :) $\endgroup$ – Alexandre Krajenbrink Sep 16 '16 at 12:49
0
$\begingroup$

This can be a way of expressing it without sum:

$$\begin{align}\sum_{i=1}^{2} i \times 10^{i-1}&=21\\ \sum_{i=1}^{3} i \times 10^{i-1}&=321\\ \sum_{i=1}^{4} i \times 10^{i-1}&=4321\end{align}\\\vdots\\\sum_{i=1}^{n} i \times 10^{i-1}=n...321$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.