---
title: 'Long-Period Runs: Domain-Specific Persistence'
url: https://www.emergentmind.com/topics/long-period-runs
type: topic
---

# Long-Period Runs: Domain-Specific Persistence

Searching arXiv for the cited paper and closely related work on longest runs in continued fractions and run theory.
Long-period runs are studied in several technically distinct senses. In continued-fraction dynamics, they are longest blocks of repeated partial quotients, either for a fixed symbol or after maximization over all symbols. In combinatorics on words, they are maximal repetitions whose minimal period exceeds a prescribed threshold. In irregularly sampled time-series analysis, they are contiguous intervals during which a locally estimated period or amplitude remains persistently displaced from a baseline value. Related stochastic work treats long runs of persistent increments in gambler’s ruin, while fluid-dynamical work on turbulence uses the adjacent notion of a longest-period periodic orbit rather than a run statistic in the combinatorial sense [2606.00505].

## 1. Domain-specific meanings and basic distinctions

The literature does not use a single universal definition of “long-period runs.” Instead, the object depends on the ambient structure being analyzed.

| Setting | Run object | Principal statistic |
|---|---|---|
| Continued fractions | consecutive repeated partial quotients | \(L_n(x,\lambda)\), \(R_n(x)\) |
| Strings | maximal repetition with minimal period \(p\) | \(Runs(w)\), threshold \(p>T\) |
| Running-Sines time series | contiguous interval of persistent local period or amplitude excursion | segments \([t_1,t_2]\) |
| Persistent gambler’s ruin | maximal consecutive \(+1\) or \(-1\) increments | \(R'_N\), \(U'_N\), \(L'_N\) |

A recurrent source of confusion is to identify these objects with one another. The continued-fraction problem concerns constant-symbol blocks in a countable-alphabet symbolic expansion. The string-theoretic problem concerns maximal periodic substrings with arbitrary minimal period. The Running-Sines formulation does not define a run at the symbol level at all; it defines a run as a contiguous interval in a trajectory of locally estimated parameters. These distinctions are structural rather than terminological.

A second distinction concerns typical versus exceptional behavior. In continued fractions, one line of work establishes almost-sure logarithmic laws for longest runs, while another constructs full Hausdorff dimensional exceptional sets on which a prescribed digit realizes the overall maximum at an admissible growth scale. The same object is therefore studied both metrically and dimensionally.

## 2. Continued fractions: prescribed longest runs

For every irrational \(x\in[0,1)\), the continued-fraction expansion is
\[
x=[a_1,a_2,a_3,\dots],
\]
where
\[
a_n(x)=\Big\lfloor 1/T^{\,n-1}(x)\Big\rfloor\in\mathbb N,
\qquad
T(x)=\frac1x-\lfloor 1/x\rfloor.
\]
Fix \(\lambda\in\mathbb N\). A run of length \(k\) of \(\lambda\) in \((a_1,\dots,a_n)\) is a string of \(k\) consecutive entries equal to \(\lambda\). The fixed-symbol longest-run up to time \(n\) is \(L_n(x,\lambda)\), the maximal block-length of \(\lambda\) among the first \(n\) partial quotients, and the overall longest-run is
\[
R_n(x)=\max_{\mu\in\mathbb N}L_n(x,\mu).
\]
An admissible growth scale is a function \(f:\mathbb N\to\mathbb N\) that is non-decreasing, unbounded, and self-neglecting in the sense that
\[
\lim_{n\to\infty}\frac{f(n+f(n))}{f(n)}=1.
\]
The central result shows that both the growth rate and the maximizing symbol can be prescribed in advance [2606.00505]. For
\[
\mathfrak E_{\lambda,f}
=
\Bigl\{x\in[0,1)\setminus\mathbb Q:
\lim_{n\to\infty}\frac{L_n(x,\lambda)}{f(n)}=1
\ \text{and}\
\forall n,\ \forall \mu\ne\lambda,\ L_n(x,\lambda)>L_n(x,\mu)
\Bigr\},
\]
one has
\[
\dim \mathfrak E_{\lambda,f}=1.
\]
This simultaneously yields three full-dimensional exceptional-set statements: fixed-symbol exact growth, overall exact growth, and prescribed dominance. In particular, the maximizing symbol in the overall longest-run problem can be fixed in advance without any loss of Hausdorff dimension.

The construction is carried out inside bounded-digit Cantor sets
\[
\mathcal F_B=\{x:1\le a_n(x)\le B\ \forall n\},
\]
whose dimension tends to \(1\) as \(B\to\infty\). With parameters \(M,B\) and \(B\ge \lambda+2\), stage \(k\) begins at time \(t_{k-1}\), sets a target run length \(r_k=f(t_{k-1})\), introduces a free block of length \(g_k\approx M r_k\), inserts the separator \((\lambda+1,\lambda+2)\) repeatedly, and then forces a run of \(\lambda\) of length \(s_k=f(t_{k-1}+g_k)\sim r_k\). Another separator terminates the stage. By design, the forced \(\lambda\)-run has the prescribed scale, while accidental runs of \(\lambda\) or of any other symbol outside the forced blocks are broken by separators and have length at most \(O(\sqrt{r_k})\ll r_k\). The resulting Cantor-type set \(\mathcal K_{\lambda,f,M,B}\subset \mathfrak E_{\lambda,f}\) satisfies
\[
\dim\mathcal K_{\lambda,f,M,B}\ge \frac{M}{M+1}\,\dim\mathcal F_B,
\]
and letting \(B\to\infty\) and \(M\to\infty\) yields full dimension.

The admissible scales include logarithmic and polynomial examples. When \(f(n)=\lceil c\log n\rceil\), one recovers full-dimensional sets with longest run growing like \(c\log n\). When \(f(n)=\lceil n^\theta\rceil\) for \(\theta\in(0,1)\), one obtains full-dimensional sets with polynomial longest-run growth. In every case, no other symbol ever matches the length of the \(\lambda\)-runs at any finite stage.

## 3. Quantitative longest-run laws for partial quotients

The exceptional-set theorem is complemented by quantitative almost-sure laws for continued fractions. In a general ergodic, measure-preserving system with a countable-alphabet observable \(X_k\), the fixed-symbol longest-run \(L_n(\omega,m)\) and the maximized run \(R_n(\omega)\) are studied under three hypotheses: quantitative mixing, an exponential cylinder estimate for one distinguished symbol, and a summed cylinder bound over all symbols [2602.11462].

Under these assumptions, for every \(c>1/2\) and almost every \(\omega\), there is \(n_{c,\omega}<\infty\) such that
\[
\Bigl|L_n(\omega,m_*)-\frac{\log n}{2\log\rho}\Bigr|
\le
\frac{c\,\log\log n}{\log\rho}
\]
for all large \(n\). If the summed cylinder bound also holds, then the same two-sided estimate applies to \(R_n(\omega)\) with the same centring constant.

For the Gauss dynamical system on \([0,1)\setminus\mathbb Q\), the observable is \(X_k(x)=a_k(x)\), the \(k\)th partial quotient. The explicit centring constants are
\[
c_n(\lambda)=\frac{\log n}{2\log \tau(\lambda)},
\qquad
\tau(\lambda)=\frac{\lambda+\sqrt{\lambda^2+4}}{2},
\]
for a fixed digit \(\lambda\), and
\[
d_n=\frac{\log n}{2\log\varphi},
\qquad
\varphi=\frac{1+\sqrt5}{2},
\]
for the overall longest run. The almost-sure first-order laws are
\[
\lim_{n\to\infty}\frac{L_n(x,\lambda)}{\frac{\log n}{2\log\tau(\lambda)}}=1,
\qquad
\lim_{n\to\infty}\frac{R_n(x)}{\frac{\log n}{2\log\varphi}}=1.
\]
The refinement is the double-logarithmic error bound: for every \(c>1/2\) and almost every \(x\), there exists \(N_{c,x}\) such that for all \(n\ge N_{c,x}\),
\[
\Bigl|L_n(x,\lambda)-c_n(\lambda)\Bigr|
\le
\frac{c\,\log\log n}{\log\tau(\lambda)},
\qquad
\Bigl|R_n(x)-d_n\Bigr|
\le
\frac{c\,\log\log n}{\log\varphi}.
\]

These results quantify the statement that, for almost every continued-fraction expansion, the longest constant block among the first \(n\) digits is of order \(\log n\). In conjunction with the prescribed-realization theorem, they separate typical logarithmic behavior from full-dimensional exceptional behavior at arbitrary admissible scales.

## 4. Long-period runs in strings

In combinatorics on words, a run is a maximal repetition rather than a constant-symbol block. For a string \(w\in\Sigma^n\), an integer \(p\) is a period of \(w\) if
\[
w[i]=w[i+p]\quad\forall\,1\le i\le |w|-p.
\]
If \(p\) is the smallest period, the exponent is
\[
e(w)=\frac{|w|}{p}.
\]
A run, or maximal repetition, is a triple \(r=(i,j,p)\) such that \(w[i..j]\) has minimal period \(p\), length at least \(2p\), and cannot be extended while preserving that period [1406.0263].

Two fundamental bounds govern the global combinatorics of runs:
\[
\rho(n)<n,
\qquad
\sigma(n)\le 3n,
\]
where \(\rho(n)\) is the maximum number of runs in a length-\(n\) string and \(\sigma(n)\) is the maximum sum of run exponents. More generally, for runs of exponent at least \(k\), one has
\[
\rho_k(n)<\frac{n}{k-1},
\qquad
\sigma_k(n)<\frac{n(k+1)}{k-1}.
\]

The structural characterization uses Lyndon words under two opposite total orders \(\prec_0,\prec_1\). Each run “owns” at least one longest Lyndon interval beginning strictly inside the run, and no two distinct runs can claim the same starting position. This disjoint-claim mechanism yields the linear bounds. It also leads to a linear-time algorithm for listing all runs: compute, for both orders, the longest Lyndon word starting at each position; then use longest-common-extension queries to extend each candidate locally and test whether it lies in a run. The procedure is linear-time and, unlike earlier linear-time algorithms, does not utilize the Lempel–Ziv factorization.

Within this framework, “long-period runs” are runs whose minimal period exceeds a threshold \(T\). Once all runs are listed in \(O(n)\) time, filtering those with \(p>T\) is immediate in \(O(m)\le O(n)\). If threshold queries are repeated, runs can be sorted by period, and counts or summed exponents above a threshold can be answered via binary search and prefix sums, or via a segment tree or Fenwick tree. This usage differs sharply from the continued-fraction longest-run problem: the period is intrinsic to the repeated word, not to a cycle-length estimate or to a constant symbol.

## 5. Running-Sines analysis of quasi-periodic time series

In the time-series literature on nearly periodic signals with irregular sampling, “long-period runs” refer to extended excursions in local period, phase, or amplitude estimated by a sliding local sinusoidal fit [1308.1129]. Given data \(\{(t_i,y_i,\sigma_i)\}\), a nominal period \(P_0\), and central times \(t_0\), one selects a window half-width \(\Delta t\), retains only points with \(|t_i-t_0|\le \Delta t\), and defines weights
\[
w_i = p\!\left(\frac{t_i-t_0}{\Delta t}\right)\!/\,\sigma_i^2.
\]
With the rectangular filter, \(p(z)=1\) for \(|z|\le 1\). The local model is
\[
f(t;C_1,C_2,C_3)=C_1+C_2\cos[\omega(t-T_0)]+C_3\sin[\omega(t-T_0)],
\qquad
\omega=\frac{2\pi}{P_0},
\]
equivalently
\[
f(t)=a_0+A\cos[\omega(t-T_0)+\phi],
\]
with
\[
a_0=C_1,\qquad A=\sqrt{C_2^2+C_3^2},\qquad \phi=\arctan2(-C_3,C_2).
\]
The coefficients are obtained by minimizing the weighted least-squares criterion \(\chi^2(t_0,\Delta t)\), with normal equations \(A_{\alpha\beta}=\sum w_i f_\alpha(t_i)f_\beta(t_i)\), \(B_\alpha=\sum w_i y_i f_\alpha(t_i)\), and solution \(C=A^{-1}B\). Formal uncertainties follow from \(\mathrm{cov}(C)=\sigma_0^2A^{-1}\), where \(\sigma_0^2=\chi^2/(M-m)\).

If period drift is suspected, the fit may be repeated over a small grid of trial periods around \(P_0\), choosing the period that minimizes \(\chi^2(t_0,P)\). In practice, only small fractional deviations \(\Delta P/P_0\lesssim 0.3\)–\(0.5\) are usually allowed for stability. The extraction of long-period runs proceeds by computing a global periodogram, choosing \(\Delta t\) typically near \(0.5P_0\), and then examining the local trajectories \(A(t_0)\), \(\phi(t_0)\), and possibly \(P(t_0)\). A run may be defined as a contiguous interval \([t_1,t_2]\) during which \(P(t_0)\) stays \(>P_0+\delta P\) or \(<P_0-\delta P\) for at least \(N_{\min}\gtrsim 2\)–\(3\) cycles, with significance above the \(1\sigma\) error bars. Amplitude runs are defined analogously.

The method was illustrated on a signal with linearly varying period, where \(P(t)\) runs from \(50\) to \(100\) over \(t\in[0,1000]\), and on AF Cyg, using \(8\,738\) AFOEV visual magnitudes with \(P_0\approx 94.187\,\mathrm d\), \(T_0=\mathrm{JD}\,2\,453\,260.2\), and \(\Delta t=P_0/2\). For AF Cyg, the baseline \(a_0(t_0)\) exhibits four slow waves of period \(\sim 180\,\mathrm d\) at the start of the data set; these are the long-period runs. The local amplitude \(A(t_0)\) sometimes falls to zero, indicating temporary cessation of the \(P_0\) oscillation.

This formulation makes clear that the “period” in long-period runs is not a substring period, as in string algorithms, but a local cycle length in a fitted oscillatory process. The advantages and limitations are correspondingly different: the method is designed for nearly periodic signals in irregularly sampled data, provides formal error bars, and is robust to gaps in the sense that only the local window matters, but noise, asymmetric windows near gaps, and secular trends can bias the local estimates.

## 6. Persistent runs in stochastic paths and adjacent dynamical notions

In a persistent gambler’s-ruin model with two strata, the path \(\{X_j\}\) evolves on \([-N,N]\), starts at \(X_0=m\), and stops on first hitting \(\pm N\). The increments \(\varepsilon_j=X_j-X_{j-1}\) take values \(\pm1\), and the persistence probabilities depend on both the previous sign and the current level: \(a_k=a\) for \(0\le k\le f-1\) and \(a_k=b\) for \(f\le k<N\), with \(f\sim \eta N\), \(0<\eta<1\) [1710.08468]. Along any nearest-neighbor lattice path, a run is a maximal sequence of consecutive \(+1\)'s or \(-1\)'s, and a long run is one of length at least \(2\). In the meander after the last visit to the origin, the statistics are
\[
R'_N=\text{total number of runs},\qquad
U'_N=\text{total number of long runs},\qquad
L'_N=\text{total number of steps}.
\]
The paper develops generating-function identities for these quantities and proves a limit theorem for the scaled combination
\[
X_N=
\left(
{\cal L}'_N-\frac{1-a-b}{(1-a)(1-b)}{\cal R}'_N-\frac{1}{(1-a)(1-b)}{\cal U}'_N
\right)/N,
\]
equivalently, in the asymptotic analysis section,
\[
X_N=
\bigl[
L'_N-\tfrac{2-a-b}{(1-a)(1-b)}R'_N+\tfrac{1}{(1-a)(1-b)}V'_N
\bigr]/N.
\]
Its characteristic function converges to an explicit non-Gaussian limit determined by \(\sigma_1,\sigma_2,\kappa_1,\kappa_2\). In the classical fair-walk case \(a=b=1/2\) and \(\eta=1/2\), the limit is the \(\mathrm{sech}^2\)-law with characteristic function \(t/\sinh t\).

A nearby but distinct use of “long-period” arises in turbulence. There, the object is not a run statistic but the longest periodic solution extracted numerically from high-symmetry forced box turbulence. The longest orbit is the period-5 solution with
\[
T_0=T_{5p}\simeq 4.91\,T_R\simeq 2.45\,T_{ED},
\]
that is, roughly two to three times the large-eddy-turnover time. It has low-activity and high-activity intervals, and turbulent trajectories approach its low-activity part roughly once every few \(T_{ED}\) [1804.00547]. This suggests an important conceptual boundary: in some dynamical-systems settings, long-period organization is carried by unstable periodic motion rather than by a run count or a longest-block statistic.

Taken together, these lines of work show that “long-period runs” is best treated as a family of domain-specific persistence phenomena. In continued fractions, the main issue is whether a prescribed digit can dominate the overall longest-run problem at a prescribed scale; in strings, the issue is maximal periodic structure and its algorithmic extraction; in time-series analysis, it is the localization of persistent period excursions; and in stochastic persistence models, it is the fluctuation theory of clustered increments.

Source: https://www.emergentmind.com/topics/long-period-runs