How can I calculate
$$1\cdot 10^1 + 2\cdot 10^2 + 3\cdot 10^3 + 4\cdot 10^4+\dots + n\cdot 10^n$$
as a expression, with a proof so I could actually understand it if possible?
How can I calculate
$$1\cdot 10^1 + 2\cdot 10^2 + 3\cdot 10^3 + 4\cdot 10^4+\dots + n\cdot 10^n$$
as a expression, with a proof so I could actually understand it if possible?
On
Your expression is $$S = \sum_{k=1}^n k 10^k$$ We can pull out a factor of $10$ to get $$S = 10 \sum_{k=1}^n k 10^{k-1}$$ Now, consider the function $$f(x) = \sum_{k=1}^{n}kx^{k-1}$$ So $S = 10f(10)$. For $x \neq 1$, we can rewrite the sum as follows: $$f(x) = \begin{align} \frac{d}{dx}\sum_{k=1}^{n} x^k &= \frac{d}{dx} \frac{x - x^{n+1}}{1-x} \end{align}$$ where we have used the fact that $(x + x^2 + \cdots + x^n)(1-x) = x - x^{n+1}$ due to telescoping.
Therefore the desired sum is $$S = 10f(10) = 10 \left.\left(\frac{d}{dx} \frac{x - x^{n+1}}{1-x}\right)\right|_{x=10}$$ I'll let you carry out the differentiation to finish the problem.
Put $$ S_n = \sum_{k=1}^{n} k\cdot 10^k.$$ Then: $$ 9 S_n = (10-1)S_n = \sum_{k=1}^{n}k\cdot 10^{k+1}-\sum_{k=1}^{n}k\cdot 10^k=\sum_{k=2}^{n+1}(k-1)\cdot 10^k-\sum_{k=1}^{n}k\cdot 10^k$$ hence: $$ 9 S_n = n\cdot 10^n -\sum_{k=1}^n 10^k = n\cdot 10^n-\frac{10^{n+1}-10}{9},$$ so: $$ S_n = \color{red}{\frac{10}{81}\left(1+(9n-1)\cdot 10^n\right)}.$$