How to find a general sum formula for the series: 5+55+555+5555+.....?
$$5+55+555+5555+\cdots+\overbrace{55\dots5}^{n\text{ fives}}$$ $$=\frac59(9+99+999+9999+\cdots+\overbrace{99\dots9}^{n\text{ nines}})$$ $$=\frac59(10^1-1+10^2-1+10^3-1+\cdots+10^n-1)$$ $$=\frac59(10^1+10^2+10^3+\cdots+10^n-n)$$ $$=\frac59\left(\frac{10^{n+1}-10}{9}-n\right).$$
Using the sum of a finite geometric series twice:
$$5+55+555+\ldots+\overbrace{55...5}^{n\;\text{times}}=\sum_{k=0}^n\left(5\cdot 10^k+5\cdot10^{k-1}+\ldots+5\cdot 10+5\right)=$$
$$=5\sum_{k=0}^n\frac{10^{k+1}-1}9=...\text{etc.}$$
Here is a recurrence relation:
- $a_0=5$
- $a_n=10a_{n-1}+5(n+1)$
Converting this to a direct formula, you get: $$\frac{5\cdot10^{n+2}-45n-95}{81}$$