Can this problem be generalised mathematically?
A bottle is 50 cents and the beer in the bottle is also 50 cents.
In the end you will have one empty bottle left, that means you spent 9.50 on the beer you drank.
With 50 cents for a beer this means you drank 19 beers.
You could express this with sequences, but it's more elegant not to. Basically, it's important to recognize that it doesn't matter when or how you got the empty bottles - it just matters how many there are - and this idea does not need sequences to express.
Let us consider the situation after you have drunk the first $10$ bottles. In particular, let us group together a bunch of consecutive actions into one more manageable action:
If you have at least $2$ empty bottles, you can exchange $2$ bottles for a full one; after you drink this, you have drunk one more bottle, but have one less empty bottle.
Observe that if you repeat this step $m$ times, you will have $10-m$ empty bottles remaining. The first $m$ for which you may not make the exchange is the first for which $10-m<2$. The first such $m$ is $9$, so you can do this $9$ times.
Then, when you add this to the original $10$ full bottles, you get the correct $19$ bottles of beer drunk.
The steps of this proof generalize well; if you start with $N$ bottles and can exchange $a$ empty ones for $b$ full ones, where $b<a$, then, whenever you have $n\geq a$ bottles, you can drink $b$ more beers at the cost of having $a-b$ less beers. You can use this step $m$ times where $m$ is the first integer such that $N-(a-b)m<a$. That is, the first integer such that $m>\frac{N-b}{a-b}$, which is given by $m=\left\lfloor\frac{N-b}{a-b}\right\rfloor+1$. Then, the total number of beers drunk is $$N+b\left(\left\lfloor\frac{N-a}{a-b}\right\rfloor+1\right)$$ where $\lfloor\cdot\rfloor$ is the floor function, giving the first integer less than the argument.
With $n$ € you can get $2n-1$ beers.
- For $n$ € you buy and drink $n$ beers, and you have $n$ empty bottles.
- Then you take two bottles $(-2)$, exchange them for a full one, drink it and add an emptied bottle to the collection $(+1)$. You have drunk one more beer and you're left with one less bottle.
- While iterating, you loose one empty bottle per each beer drank.
- Finally you stop with the last single bottle.
So you have exchanged $(n-1)$ empty bottles for $(n-1)$ beers, hence you had $n+(n-1)=2n-1$ beers and one empty bottle remains.