2025 SSMO Speed Round Problems/Problem 5
Problem
Let be the number formed when all the two-digit positive integers are concatenated in increasing order. How many ordered triples of digits
are there such that
and
appear as consecutive digits (in that order) in the decimal representation of
?
Solution
Since there are two-digit positive integers,
has
digits. Then, there are
(not necessarily distinct) ordered triples of digits
such that the string of digits
appears in the decimal representation of
. Furthermore, any such string
can appear at most twice in
. This is because if
appears in
, then either
or
is one of the two-digit positive integers that was originally concatenated to form
. Each of these two possibilities fixes the position of the string
among the digits of
because every two-digit positive integer was used exactly once in forming
. Therefore, we will count the number of strings
that appear twice in
and then subtract that number from
.
Suppose the string appears twice in
. Let
denote any unknown digit. Then,
and
are consecutive two-digit positive integers in that order, and
and
are also consecutive two-digit positive integers in that order. If
and
are consecutive, we must have
. If
and
are consecutive in that order and
, we must have
and
. This implies that
, where
is some digit.
Now, the string appears twice in
so long as each of
,
,
, and
is indeed a two-digit positive integer. This is equivalent to
,
, and
all being nonzero digits, which means that we must have
. Each value of
corresponds to a unique string that appears twice in
, so the answer is
.
~Sedro