Probability that a sequence repeats itself Given an infinite sequence $a_n$ of uniformly random integers $0$ to $9$, what is the probability there exist an integer $m$ such that the sequence $a_1$ to $a_m$ is equal to that from $a_{m+1}$ to $a_{2m}$?

What if we restrict to two symbols, or $k$ symbols?
I can't give an exact answer, but an interesting connection and some numerical results.

Some dabbling with short examples shows that the events for different integers $m$ are nearly but not exactly independent. For instance, some sequences that don't repeat at $m=3$ repeat at $m=2$ but not at $m=1$, whereas for sequences that do repeat at $m=3$ repetition at $m=2$ implies repetition at $m=1$. However, the effect from the dependence appears quite small, so

$$
\prod_{m=1}^\infty(1-k^{-m})
$$

should be a good approximation to the probability that there is no repetition. Incidentally, if $k$ is a prime power, this is the probability that a large random square matrix over $\mathbb F_k$ is invertible; see Probability that a random binary matrix is invertible. In that answer, I computed the product for $k=2$ to be approximately $0.288788$, which would make the probability for a binary sequence to exhibit repetition approximately $0.711212$.

Here are numerical results for $k=2$ for repetitions up to $m=17$. Each row contains the number of strings of length of $2m$ that repeat, the number of strings that don't repeat, the proportion $p_m$ of strings that repeat, and a value $\alpha_m=-\log_2(1-(1-p_m)/(1-p_{m-1}))$ that would be $m$ if repetition at $m$ were independent of previous repetitions (here's the code):

$$
\begin{array}{rrrlr}
m&amp;\text{repeating}&amp;\text{non-repeating}&amp;\text{proportion}&amp;\alpha_m\\\hline
1 &amp; 2 &amp; 2 &amp; 0.5 &amp; 1.00000\\
2 &amp; 10 &amp; 6 &amp; 0.625 &amp; 2.00000\\
3 &amp; 44 &amp; 20 &amp; 0.6875 &amp; 2.58496\\
4 &amp; 182 &amp; 74 &amp; 0.7109375 &amp; 3.73697\\
5 &amp; 738 &amp; 286 &amp; 0.720703125 &amp; 4.88753\\
6 &amp; 2972 &amp; 1124 &amp; 0.7255859375 &amp; 5.83794\\
7 &amp; 11924 &amp; 4460 &amp; 0.7277832031 &amp; 6.96450\\
8 &amp; 47768 &amp; 17768 &amp; 0.7288818359 &amp; 7.95290\\
9 &amp; 191214 &amp; 70930 &amp; 0.7294235229 &amp; 8.96725\\
10 &amp; 765136 &amp; 283440 &amp; 0.7296905518 &amp; 9.98483\\
11 &amp; 3061104 &amp; 1133200 &amp; 0.7298240662 &amp; 10.98340\\
12 &amp; 12245530 &amp; 4531686 &amp; 0.7298904657 &amp; 11.99044\\
13 &amp; 48984342 &amp; 18124522 &amp; 0.7299235761 &amp; 12.99397\\
14 &amp; 195941804 &amp; 72493652 &amp; 0.7299401015 &amp; 13.99640\\
15 &amp; 783776080 &amp; 289965744 &amp; 0.7299483567 &amp; 14.99761\\
16 &amp; 3135122038 &amp; 1159845258 &amp; 0.7299524820 &amp; 15.99838\\
17 &amp; 12540523572 &amp; 4639345612 &amp; 0.7299545438 &amp; 16.99901\\
\end{array}
$$

The agreement with $0.711212$ is OK but not marvelous. As suggested by the $m=3$ example, the dependence slightly increases the probability of repetition because a repetition implies correlations between the conditions of repetition at lower values of $m$; but this effect is strongest at $m=3$ and becomes negligible at higher values of $m$, where $\alpha_m\approx m$ shows that almost exactly the expected proportion of sequences repeat for the first time. Thus we can get an accurate estimate of the limit probability from $p\approx p_{17}+(p_{17}-p_{16})\approx0.7299566056$, which should be accurate to eight or nine digits.

I checked OEIS for the sequences of both the repeating and the non-repeating counts; no hit.

P.S.: Note that as t.b. pointed out in a comment under the answer linked to above, by the pentagonal number theorem the above product is given by

$$
\begin{align}
\prod_{m=1}^\infty(1-k^{-m})&amp;=\sum_{j=-\infty}^\infty(-1)^jk^{-j(3j-1)/2)}\\&amp;=1-k^{-1}-k^{-2}+k^{-5}+k^{-7}-k^{-12}-k^{-15}+k^{-22}+k^{-26}-\dotso\;,
\end{align}
$$

which leads to an interesting pattern of digits in its representation in base $k$:

$$
\begin{align}
\prod_{m=1}^\infty(1-2^{-m})&amp;=0.01001001111011100000010000111111110111110000000000100\ldots_2\;,
\\
\prod_{m=1}^\infty(1-10^{-m})&amp;=0.89001009999899900000010000999999998999990000000000100\ldots_{10}\;.
\end{align}
$$
(I'm not an expert on this (I'm a newbie), but I suddenly hit something while reading the question, it may be wrong)

Assuming $_m$ is a constant:

It will depend on how big $_m$ is. If the $_m = 1$, then the probability would be $\frac1{10}$. If $_m = 2$, then $\frac1{100}$. (ie if you had $19$ as the first two, there are $100$ possibilties of the second two, so the probability of $19$ coming up is $\frac1{100}$.

Therefore, the probablity is $$\frac1{10^m}$$

If $_m$ can be any number:

Then..... I don't know how to work that out. (Unless I suddenly have a brainwave...)

(This is my first answer, I like mathjax.)