Difference between revisions of "2025 SSMO Speed Round Problems/Problem 5"

(Created page with "==Problem== Let <math>N = 101112\cdots9899</math> be the number formed when all the two-digit positive integers are concatenated in increasing order. How many ordered triples...")
 
(Solution)
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
==Solution==
 
==Solution==
 +
 +
Since there are <math>90</math> two-digit positive integers, <math>N</math> has <math>180</math> digits. Then, there are <math>180 - 2 = 178</math> (not necessarily distinct) ordered triples of digits <math>(a,b,c)</math> such that the string of digits <math>abc</math> appears in the decimal representation of <math>N</math>. Furthermore, any such string <math>abc</math> can appear at most twice in <math>N</math>. This is because if <math>abc</math> appears in <math>N</math>, then either <math>\overline{ab}</math> or <math>\overline{bc}</math> is one of the two-digit positive integers that was originally concatenated to form <math>N</math>. Each of these two possibilities fixes the position of the string <math>abc</math> among the digits of <math>N</math> because every two-digit positive integer was used exactly once in forming <math>N</math>. Therefore, we will count the number of strings <math>abc</math> that appear twice in <math>N</math> and then subtract that number from <math>178</math>.
 +
 +
Suppose the string <math>abc</math> appears twice in <math>N</math>. Let <math>?</math> denote any unknown digit. Then, <math>\overline{ab}</math> and <math>\overline{c?}</math> are consecutive two-digit positive integers in that order, and <math>\overline{?a}</math> and <math>\overline{bc}</math> are also consecutive two-digit positive integers in that order. If <math>\overline{?a}</math> and <math>\overline{bc}</math> are consecutive, we must have <math>a\ne c</math>. If <math>\overline{ab}</math> and <math>\overline{c?}</math> are consecutive in that order and <math>a\ne c</math>, we must have <math>c = a+1</math> and <math>b=9</math>. This implies that <math>(a,b,c) = (d,9,d+1)</math>, where <math>d</math> is some digit.
 +
 +
Now, the string <math>abc</math> appears twice in <math>N</math> so long as each of <math>\overline{ab}</math>, <math>\overline{c?}</math>, <math>\overline{?a}</math>, and <math>\overline{bc}</math> is indeed a two-digit positive integer. This is equivalent to <math>a</math>, <math>b</math>, and <math>c</math> all being nonzero digits, which means that we must have <math>d \in \{1,2,\dots, 8\}</math>. Each such value of <math>d</math> corresponds to a unique string <math>abc</math> that appears twice in <math>N</math>, so the answer is <math>178-8 = \boxed{170}</math>.
 +
 +
~Sedro

Latest revision as of 21:01, 9 September 2025

Problem

Let $N = 101112\cdots9899$ be the number formed when all the two-digit positive integers are concatenated in increasing order. How many ordered triples of digits $(a,b,c)$ are there such that $a,$ $b,$ and $c$ appear as consecutive digits (in that order) in the decimal representation of $N$?

Solution

Since there are $90$ two-digit positive integers, $N$ has $180$ digits. Then, there are $180 - 2 = 178$ (not necessarily distinct) ordered triples of digits $(a,b,c)$ such that the string of digits $abc$ appears in the decimal representation of $N$. Furthermore, any such string $abc$ can appear at most twice in $N$. This is because if $abc$ appears in $N$, then either $\overline{ab}$ or $\overline{bc}$ is one of the two-digit positive integers that was originally concatenated to form $N$. Each of these two possibilities fixes the position of the string $abc$ among the digits of $N$ because every two-digit positive integer was used exactly once in forming $N$. Therefore, we will count the number of strings $abc$ that appear twice in $N$ and then subtract that number from $178$.

Suppose the string $abc$ appears twice in $N$. Let $?$ denote any unknown digit. Then, $\overline{ab}$ and $\overline{c?}$ are consecutive two-digit positive integers in that order, and $\overline{?a}$ and $\overline{bc}$ are also consecutive two-digit positive integers in that order. If $\overline{?a}$ and $\overline{bc}$ are consecutive, we must have $a\ne c$. If $\overline{ab}$ and $\overline{c?}$ are consecutive in that order and $a\ne c$, we must have $c = a+1$ and $b=9$. This implies that $(a,b,c) = (d,9,d+1)$, where $d$ is some digit.

Now, the string $abc$ appears twice in $N$ so long as each of $\overline{ab}$, $\overline{c?}$, $\overline{?a}$, and $\overline{bc}$ is indeed a two-digit positive integer. This is equivalent to $a$, $b$, and $c$ all being nonzero digits, which means that we must have $d \in \{1,2,\dots, 8\}$. Each such value of $d$ corresponds to a unique string $abc$ that appears twice in $N$, so the answer is $178-8 = \boxed{170}$.

~Sedro