Bernoulli process and two exponentials Suppose that a very long Bernoulli process gives a sequence with possible values: $A$ with probability $p$, and $B$ with probability $1-p$. The expected fraction of contiguous sequences of length $k$ that only contain $A$s must be $p^k$.
I made some numerical experiments and found that, recording only the length of the entire sequences of $A$ contiguous (e.g., in $\dots BAAAB\dots$ only write down "one sequence of length 3") and counting them, the frequency of those lengths also have an exponential dependence on the sequences length.
Why is it happening and how those exponential are related?

The distribution of the number of consecutive A's in each run of A's has a geometric distribution.
https://en.wikipedia.org/wiki/Geometric_distribution
(However, note that the parameter $p$ there is equivalent to your $1-p$.)
It is a given there's at least one $A$ (since that's the condition for you to count a run at all), and then the probability of each additional $A$ is $p$ times the probability of the next smaller run.
That is, if $X$ is the length of a run, $P(X=t) = p\cdot P(X=t-1)$.
Hence $P(X=t)=P(X=1)\cdot p^{t-1}$. Consequently, the total probability = $P(X=1)\cdot \frac{1}{1-p}$ (from the sum of a geometric series), so $P(X=1) = 1-p$.
Hence the probability that the run-length is $t$ is $(1-p)\, p^{t-1}, \quad t=1,2,...$
The shape of the p.m.f. is indeed a discrete version of an exponential curve.
