Probability of having 2 consequent 1's in a random finite sequence Fix natural numbers $t,n,k$. Consider the following stochastic process for generation of finite sequences of elements from $\{1,\ldots,n\}$: $\sigma_0$ is the empty sequence. Suppose we have $\sigma_i$; if $i=t$, we stop the process and declare $\sigma=\sigma_i$. If the number of $1$'s in $\sigma_i$ is $k$, we also terminate the process and declare $\sigma=\sigma_i$. Otherwise, we let $\sigma_{i+1}=\sigma_i^\frown x$ where $x$ is a uniformly chosen element from $\{1,\ldots,n\}$ and continue.
This stochastic process inspires a distribution on all finite sequences of length at most $t$ having at most $k$ $1$'s, which is not uniform.
I have a couple of questions about this distribution, but one which interests me most at the moment is this: what is the probability of having two consequent $1$'s? Phrased differently: what is the probability of having $(1,1)$ as a subsequence of $\sigma$?
 A: The probability that 11 is a subsequence of $\sigma$ is the probability that a Markov chain on the state space $\{0,1,2\}$ starting from the state $0$ visits the state $2$ at or before time $k$, if the transition probabilities are $1-x$ for the transitions $0\to1$ and $1\to2$, and $x$ for the transitions $0\to0$ and $1\to0$, where $x=1-1/n$. 
The usual one-step recursion shows that the hitting time $T$ of state $2$ starting from state $i=0$ or $i=1$ has generating function $u_i=E_i(s^T)$ where $$u_0=(1-x)su_1+xsu_0,\qquad u_1=(1-x)s+xsu_0.$$ Solving for $u_0$ yields
$$
E_0(s^T)=\frac{(1-x)^2s^2}{1-xs-x(1-x)s^2}.
$$
Assume that $(u,v)$ is such that $u-v=x$ and $uv=x(1-x)$, then $$1-xs-x(1-x)s^2=(1+vx)(1-ux),$$ hence
$$
E_0(s^T)=\frac{(1-x)^2s^2}{u+v}\,\left(\frac{u}{1-us}+\frac{v}{1+vs}\right),
$$
hence, for every $i\geqslant2$,
$$
P_0(T=i)=\frac{(1-x)^2}{u+v}\,\left(u^{i-1}+(-1)^iv^{i-1}\right).
$$
Summing this on $i\geqslant k$ yields the desired probability as
$$
P_0(T\geqslant k)=\frac{(1-x)^2}{u+v}\,\left(\frac{u^{k-1}}{1-u}+(-1)^k\frac{v^{k-1}}{1+v}\right).
$$
Note finally that
$$
u=\frac{\sqrt{4x-3x^2}+x}2,\qquad v=\frac{\sqrt{4x-3x^2}-x}2,
$$
and that, when $k\to\infty$,
$$
P_0(T\geqslant k)\sim\frac{(1-x)^2}{u+v}\,\frac{u^{k-1}}{1-u}=c\,u^k,
$$
where
$$
c=\frac12\,\left(1+\sqrt{\frac{x}{4-3x}}\right).
$$
