A Probabilistic Drinking Problem This question was asked by a fellow MSE user in chat. Motivational credits to @Quintec.



Question:


  Bob goes to a bar and drinks a drink. On drink $n$, Bob has a $1-\left(\frac12\right)^n$ probability of getting drunk. If he doesn't get drunk that drink, then he will add $n$ drinks to the amount of drinks he drinks. Even if he gets drunk before finishing his "queue" of drinks, he will still finish the rest of the drinks. He will stop drinking after that. What is his expected number of drinks?


Attempt:

We have the following relationships:

1

drunk -&gt; 1 (probability 1/2)

not drunk -&gt; 1 2 (adds on one drink - probability 1/2)

1 2

drunk -&gt; 1 2 (probability 3/4)

not drunk -&gt; 1 2 3 4 (adds on two drinks - probability 1/4)

1 2 3 4

drunk -&gt; 1 2 3 4 (probability 7/8)

not drunk -&gt; 1 2 3 4 5 6 7 (adds on three drinks - probability 1/8)

1 2 3 4 5 6 7 and so on


Therefore the expectation is given by $$\frac12\times1+\frac12\left[\frac34\times2+\frac14\left[\frac78\times4+\frac18\left[\cdots\right]\right]\right]=\sum_{i=1}^\infty\left[\frac1{2^{i(i-1)/2}}\times\frac{2^i-1}{2^i}\times\left(1+\frac{i(i-1)}2\right)\right]$$ on noticing that $1,2,4,7,\cdots$ are the sequence of one plus the triangular numbers, and this can be written as $$\sum_{i=1}^\infty \frac{2^i-1}{2^{(i^2+i+2)/2}}\left(i^2-i+2\right)\approx1.800$$ Unfortunately, W|A does not return a closed form. So is there any methods to find such a form, if any exists?
Let $S$ be our sum. We have:
$$S=\sum_{i=1}^\infty \frac{2^i-1}{2^{(i^2+i+2)/2}} \cdot (i^2-i+2) = \sum_{i=1}^\infty \frac{2^i}{2^{(i^2+i+2)/2}} \cdot (i^2-i+2) - \sum_{i=1}^\infty \frac{1}{2^{(i^2+i+2)/2}} \cdot (i^2-i+2)$$
$$S=\sum_{i=1}^\infty \frac{1}{2^{(i^2-i+2)/2}} \cdot (i^2-i+2)- \sum_{i=1}^\infty \frac{1}{2^{(i^2+i+2)/2}} \cdot (i^2-i+2)$$
$$S=\sum_{i=1}^\infty \frac{1}{2^{(i^2-i+2)/2}} \cdot (i^2-i+2)- \sum_{i=1}^\infty \frac{1}{2^{(i^2+i+2)/2}} \cdot (i^2+i+2)+ \sum_{i=1}^\infty \frac{2i}{2^{(i^2+i+2)/2}}$$
Note that $(i-1)^2+(i-1)+2 = i^2-i+2$
$$S=\sum_{i=1}^\infty \frac{1}{2^{(i^2-i+2)/2}} \cdot (i^2-i+2)- \sum_{i=2}^\infty \frac{1}{2^{(i^2-i+2)/2}} \cdot (i^2-i+2)+ \sum_{i=1}^\infty \frac{2i}{2^{(i^2+i+2)/2}}$$ 
$$S=\frac{1^2-1+2}{2^{(1^2-1+2)/2}}+\sum_{i=1}^\infty \frac{i}{2^{(i^2+i)/2}}$$
$$\bbox[5px,border:2px solid red] {S=1+\sum_{i=1}^\infty \frac{i}{2^{i(i+1)/2}}}$$

Now, our sum is simplified to a simpler infinite sum. However, I am unsure whether the sum can actually have any closed form, as the numerator is quite small compared to the denominator, and the exponents are triangular numbers. If this sum does have any closed form, a good idea to find it would be to first evaluate the sum:
$$S(k)=\sum_{i=k}^\infty \frac{1}{2^{i(i+1)/2}}$$
for $k \in \mathbb N$. Then, we can express:
$$S=\sum_{i=1}^\infty S(i)$$
As you stated, it seems that the answer tends to the value of $S=1.8009367251072776$. I would say that this is quite good an approximation since the terms get small really fast. Thus, $S \approx 1.8$.
This is really a comment, but I can't fit it in the comment box.  

We can calculate the expected number of drinks by adding up the probabilities of Bob's taking each drink, by linearity of expectation.

The probability that Bob takes the first drink is $1$ and the probability that he takes the second is $\frac12$ which gives us $\frac32$ so far.  The probability that he takes the third and forth drinks is the probability that he takes the second drink, $\frac12,$ times the probability that it doesn't make him drunk, $\frac14$ or $\frac18,$ so we have $\frac32+\frac28=\frac74.$  He take drinks $5,6,7$ if drink $3$ doesn't make him drunk.  The probability that he takes drink $3$ is $\frac18$ and it makes him drunk with probability $\frac18$ so we now have $\frac74+{3\over64}= {115\over64}.$  Now if he takes the fourth drink (probability $\frac18$) and it doesn't make him drunk (probability ${1\over16}$), Bob will drink another $4$ drinks, so we're up to ${115\over64}+{1\over32}={117\over64}=1.828125.$

Since this is already greater than the sum of your series, I feel there must be something wrong with your calculations.  I must admit that I wasn't able to follow your calculations in detail, so I don't know what the problem is.  Of course, it's also possible that I don't understand the question.