The comma sequence is the integer sequence constructed by starting with 1 and repeatedly applying the following rule. If the current term
is , the next term is the smallest positive
integer
satisfying
where
is the last decimal digit of
and
is the first decimal digit
of
. If no such
exists, the sequence terminates
(Angelini et al. 2024, p. 215). The first terms are 1, 12, 35, 94, 135,
186, 248, 331, 344, 387, ... (OEIS A121805).
The name refers to the digits immediately on either side
of each comma. For example, in "12, 35" these
digits are 2 and 3, forming 23, which equals
. The sequence has exactly
2137453 terms and ends at 99999945 (Angelini et al. 2024, pp. 215-216).
Generalized comma sequences allow any positive integer as the initial term and any base , with
replaced by
and the digits read in base
. Dougherty-Bliss and Ter-Saakov (2025,
p. 2) gave a computational proof that these sequences
terminate for every initial term in each base from 3 through
633.
If the requirement to choose the smallest next term is dropped, each permitted is called a comma-child of
. The child graph is the directed
graph on the positive integers with a directed edge from
to each of its comma-children. It has an infinite path
in every base
(Angelini et al. 2024, p. 223). Randall
(2026, pp. 1-2, 6) reports that in base 10 there is
a unique infinite path up to deletion of a finite initial
segment. Its earliest starting point is 20, and it begins 20, 22, 46, 107, 178, 260,
262, 284, 327, 401, ... (OEIS A367620). Coding
the choice of the smaller or larger comma-child at each fork by 0 or 1, respectively,
gives the periodic sequence 0, 0, 1, 1, 1, 0,
0, 1, 1, 1, ..., with reported period 314 (OEIS A400003).
The terms along the infinite path themselves are increasing,
not periodic. The sequence OEIS A400003
was a runner-up in the OEIS 400K celebration contest (OEIS Foundation Inc. 2026).