This is simply a linear function.
Let $f(x) = mx$ where $f(x)$ is the cost at level $x$ and $m$ is the slope (the rate of increase of $f(x)$, i.e. how much $f$ increases by a one-unit change in $x$).
Since for each unit change of $x$ (for each additional level), we get an additional $5000$ in costs, then $m=5000$.
So $$f(x)=5000x.$$
So the costs at level $45$ is $f(45) = 5000\times 45$.
After your edit: The total costs at level 45 is
(cost at level $1$) + (cost at level $2$) $+ \ldots + $ (cost at level $45$)
$$=f(1) + f(2) + \ldots + f(45) \\ = 5000(1) + 5000(2) + \ldots + 5000(45) \\ = 5000(1+2+3+4+\ldots+45) \\ \stackrel{\dagger}{=} 5000\times\frac{45(46)}{2}$$
$(\dagger):$ from the formula for sum of first $N$ positive integers
$$1+2+3+\ldots+N = \frac{N(N+1)}{2}$$
If you're doing this in Excel, the important step is the $(\dagger)$ step.
(45(46))/2
. Why the(46)
? – Henny Lee Oct 30 '17 at 03:09This is known as an arithmetic series. – Twenty-six colours Oct 30 '17 at 03:43