Playing the St. Petersburg Lottery until I lose everything This question continues the following question: Calculating the probability of winning at least $128$ dollars in a lottery St. Petersburg Paradox
Here is a lottery: A fair coin is flipped repeatedly until it produces "heads." If the first occurrence of heads is on the $n$th toss, you are paid $2^{n−1}$. So for instance, if heads appears on the first toss, you are paid 1 dollar; if heads appears for the first time on the second toss, you are paid 2 dollars, and so on.
Say the cost of entering the lottery is 10 dollars and I start with 100 dollars. I'll play the lottery again and again until I have more than 10 dollars to play the game.
Now my question is, what is the probability that I can go on playing the game?
Example: Say during the first game, I get a heads on the first toss then I'll be left with 91(=100-10+1) dollars. I'll play the game again by paying 10 dollars and this time I may get a heads on the 7 toss and now I'll have 145(=91-10+64) dollars and so on.
Edit: Or Is it possible to find the probability of surviving the nth round given that I have survived all the previous rounds??
 A: I do not see an easy approach, so I tried a simulation in R using the following code, which sees whether you lose in the first million games, repeated $100000$ times:
set.seed(2015)
subgames   <- 10
supergames <- 100000 # maximum games is supergames*subgames
cases      <- 100000 
gain     <- function(x, y=10){ ifelse(y<10, y, y + 2^-ceiling(log(x,2)) -10) }
position <- matrix(rep(NA,(subgames+1) * cases), nrow=cases)
position[, 1] <- 100 # start with 100
for (r in 1:supergames){
    subcases <- nrow(position)
    udata <- matrix( runif(subgames * subcases ), nrow=subcases )
    for (n in 1:subgames ){ position[, n+1] <- gain(udata[,n], position[,n]) } 
    position[, 1] <- position[, subgames+1]     # ready to restart 
    position <- position[position[,1] >= 10, ] # remove lost games
    }
nrow(position)/cases

It produced the result 0.00021, suggesting that the simulation lost $99979$ times but failed to lose $21$ times.  Of those $21$ cases, after a million games the surviving bankrolls were in the range $68183$ to $17492689$ in this particular simulation, so there was a net average gain.  
Obviously there is uncertainty associated with any simulation and there may be further losses as the number of games increases further, but this suggests the probability of not losing overall is extremely small. About $82\%$ of losses seemed to have happened in the first twenty games and about $97\%$ of losses in the first hundred games, so the unbounded potential gains do not often offset the price of playing repeated games. 
A: Let $P_n$ be the probability of losing (not indefinitely having enough money to play) if you start with $n$ dollars. Now, we can observe that the probabilities don't change after one step, except it's now distributed over the possible values of $n$. As such, we can express that, for $n\geq 10$,
$$
P_n = \frac{P_{n-9}}2 + \frac{P_{n-8}}4 + \frac{P_{n-6}}8 + \cdots + \frac{P_{n-10+2^k}}{2^{k+1}} + \cdots
$$
which states our requirement that the limit to infinity doesn't change. We also have that $P_n=1$ for $n<10$.
Investigations of this system using Octave, by constructing the matrix system for this, while taking $P_n=0$ for $n>n_{max}$ (this creates an $(n_{max}-9)\times(n_{max}-9)$ matrix system), produce an interesting result:
As we increase $n_{max}$, $P_n$ gets larger for each $n$... in a way that suggests that they are tending to 1. That is, it is looking as though, for any finite $n$, the final result will actually be $P_n=1$, meaning that, given enough time, the player will run out of money at some point. For instance, for  $n_{max}=5009$, we get $P_{100}\approx 0.9960939$. For $n_{max}=10009$, we get $P_{100}\approx 0.9977098$. Here are the probability curves that result for $n_{max}$ = 2509, 5009, and 10009 (note: x coordinate is shifted by 9, so the first curve runs from 1 to 2500 rather than 10 to 2509):

Note that these effectively show the probability of losing if the player has $n$ dollars at the start and the house has $n_{max}-n$ dollars that they can give - that is, if the player wins enough to reach $n_{max}$, then they have cleaned out the house's bank, and have "won", while if the player drops below 10 dollars, they have "lost". Reminder: the $P_n$ shown in the graph shows the probability of losing.
A: Note: The following argument makes it plausible that the probability to loose the game tends to zero in the long run.
We show, that this behaviour is valid independent of the cost of a game, as long as it is constant and we argue, that it is also valid independent of the seed money.

Intro: The St. Petersburg Paradox is a famous game dealing with gambler ruin sequences. One important paper regarding this game is Note on the law of large numbers and fair games by W. Feller from $1937$.
Another interesting paper On Steinhaus' resolution of the St. Petersburg Paradox by S. Szörgö and G. Simmons elaborates the so-called Steinhaus sequences. These sequences, introduced $1949$ by Hugo Steinhaus  show with probability $1$ the same empirical distribution function as the sequences coming from the St. Petersburg Paradox.
The essential of the paradox is the non-existence of a finite expectation value and most of the papers address the problem how could the game adopted to change it into a fair game.

Critical sequences: OP's question does not care about these aspects. Here we are interested only in the probability of winning the game in the long run. Let's look at a sequence of heads and tails
\begin{align*}
HH\color{blue}{T}HHHH\color{blue}{T}\color{blue}{T}\color{blue}{T}H\color{blue}{T}H\color{blue}{T}\ldots\tag{1}
\end{align*}
The sequence in (1) starts with the $6$ consecutive games
\begin{align*}
HH\color{blue}{T},HHH\color{blue}{T},\color{blue}{T},\color{blue}{T},H\color{blue}{T},H\color{blue}{T},\ldots
\end{align*}
Whenever the coin shows $H$, the gain is doubled until the first time $T$ occurs, ending this instance of the game. If $c_0$ is the cost for each instance we get for
$$H^nT\qquad \text{ a gain of} \qquad 2^{n}-c_0 \qquad\qquad n\geq 0$$
Let's look at some characteristic aspects. We observe that $c_0$ compensates roughly $[\log_2(c_0)]$ wins. In OPs example $c_0=10$ and so whenever a game is of the form $T,HT,HHT$ or $HHHT$, ie. a game with no more than $[\log_2(c_0)]$ $H$'s we have a loss (or no win in case $c_0=2^k$). Let's call those sequences which decrease the current score critical sequences.

We observe that one characteristic to determine the result of the game is the distribution of critical sequences in the long run of the game.
The higher the value $c_0$, the more critical sequences are possible within a game and the question is, do they contribute a considerable amount among all pathes, so that the probability for a loss in the long-run is greater zero.

We also note, that at the time we do not adress the seed money $m_0$. In OP's example $m_0=100$, but let's ignore it for the moment and assume $m_0=0$.

Lattice Pathes: 
We can model the game using lattice pathes. We thereby associate a lattice path to a sequence of form (1) consisting of ascending steps $a$ for each H in $(1,1)$ direction and descending steps $b$ for each T in $(1,-1)$ direction.

We now analyse lattice pathes with respect to critical sequences.
Let
$$SEQ(a)=\{\varepsilon,a,aa,aaa,\ldots\}$$
denote all pathes containing only a's with length $\geq 0$. A path with length zero is denoted with $\varepsilon$. The corresponding generating function is
$$(az)^0+(az)^1+(az)^2+\ldots=
\frac{1}{1-az},$$
 with the exponent of $z^n$ marking the length $n$ of a path of $a$'s and the coefficient of $(az)^n$ marking the number of pathes of length $n$.
Let $SEQ^{\geq k}(a)$ be the set of all pathes of $a$'s with length $\geq k$. The generating function for $SEQ^{\geq k}(a)$ is $\frac{(az)^k}{1-az}$.

We can now describe the sequences in (1) as all those pathes which can be build as concatenation of one or more parts of the form
$$SEQ(a)b=\{b,ab,aab,aaab,\ldots\}\qquad\longleftrightarrow\qquad G(z)=\frac{bz}{1-az}$$
This leads to the formal description
$$SEQ^{\geq 1}(SEQ(a)b)$$ with the generating function
\begin{align*}
H(z)&=\frac{G(z)}{1-G(z)}=\frac{\frac{bz}{1-az}}{1-\frac{bz}{1-az}}
=\frac{bz}{1-(a+b)z}\\
\\
&=bz\sum_{n\geq 0}(a+b)^nz^n\\
&=\sum_{n\geq 0}\sum_{j=0}^n\binom{n}{j}a^jb^{n-j+1}z^{n+1}\tag{2}
\end{align*}
Conclusion: In case $c_0=10$, meaning the cost of one instance of a game is $10$, the critical pathes are $b,ab,aab$ and $aaab$. The distribution of these critical pathes within all $2^n$ pathes of length $n+1$ and ending with $b$ is according to (2)
  \begin{align*}
\frac{\binom{n}{0}+\binom{n}{1}+\binom{n}{2}+\binom{n}{3}}{2^n}=\frac{P(n)}{2^n}
\end{align*}
  with $P(n)$ a polynomial of degree $3$.
We observe that in the long run for all values $c_0$ the number of critical pathes within a game of length $n$ correlates to a polynomial $P(n)$ of degree $[\log_2(c_0)]$ and since
  \begin{align*}
\lim_{n\rightarrow\infty}\frac{P(n)}{2^n}=0\tag{3}
\end{align*}
  the probability to loose the St. Peterburg game in the long run also seems to tend to zero.

Note:


*

*The seed money $m_0$ has presumably only influence with respect to the length of the games. The greater the seed, the greater the chance for a longer game. But it also seems that this has no impact for the resulting probability when considering the wins and losses of all pathes of length $n$ with $n$ going to infinity. The polynomial increase of the critical pathes versus the exponential increase of all pathes will always tend to a winning probability of $1$ in the long run.


Note: The notation and the formal description of pathes corresponds to an example in I.1.4 in  P. Flajolet's and R. Sedgewicks Analytic Combinatorics
A: If you play 8 games, you expect to be down \$9 in 4, \$8 in 2 and \$6 in 1 with the last game still undecided. So you should expect to be down \$60. If you play another 8 games, you will be -\$9 $* 8$, -\$8 $* 4$, -\$6 $* 2$ and down another \$2, with a minor chance of winning \$2. So down \$116, and so game over. You could win, but the probability of you winning is only $1/16$, so for every 16 plays, you are down roughly \$116.
You might think you could easily win \$1014, but it would take approxiamately 2048 attempts, costing you \$20480.
I wrote a similar game once, but in this one the odds are equal:
http://demonstrations.wolfram.com/GameOfDice/
