What is the formula to calculate
$$n^0 + n^1 + n^2 + n^3 + \cdots + n^k$$
Calculate example
$$185^0 + 185^1 + 185^2 + \cdots + 185^{13}$$
Any hints appreciated!
What is the formula to calculate
$$n^0 + n^1 + n^2 + n^3 + \cdots + n^k$$
Calculate example
$$185^0 + 185^1 + 185^2 + \cdots + 185^{13}$$
Any hints appreciated!
For your particular example...
\begin{align} S &= 185^0 + 185^1 + 185^2 + \cdots + 185^{13} \\ &= 185^0 + 185^1 + 185^2 + \cdots + 185^{13} + 185^{14} - 185^{14}\\ &= 185^0 + 185^1(185^0 + 185^1 + 185^2 + \cdots + 185^{13}) - 185^{14} \\ &= 1 + 185 S - 185^{14} \\ S - 185 S &= 1 - 185^{14} \\ (185 - 1)S &= 185^{14} - 1 \\ &\phantom{n}\vdots \end{align}
This is the geometric sum formula:
If $n \neq 1$, we have
$$\sum_{i = 0}^k n^i = \frac{1-n^{k+1}}{1-n}.$$