9. The sequence $a_{n}$ is constructed as follows: $a_{1}, a_{2}$ are integers between 1 and 9 (inclusive); for $n \geq 3$, if the sum of $a_{n-1}$ and $a_{n-2}$ consists of a single digit, then that sum is the value of $a_{n}$; if instead $a_{n-1} + a_{n-2}$ has more than one digit, the sum of its digits will be the value of $a_{n}$ (for example, if $a_{4}=7$ and $a_{5}=8$, then $a_{6}=6$ because $7+8=15$ and $1+5=6$). How many choices are there for the pair $\left(a_{1}, a_{2}\right)$ such that $a_{2023}=9$?
(A) 1
(B) 3
(C) 9
(D) 27
(E) 81
9. The answer is $\mathbf{( C )}$. We observe that for $n \geq 3, a_{n}$ is the number in $\{1, \ldots, 9\}$ given by the remainder of the division of $a_{n-2}+a_{n-1}$ by 9 (where 9 represents remainder 0). In particular, $a_{n-2}$ is the remainder (as above, taken in $\{1, \ldots, 9\}$) in the division of $a_{n}-a_{n-1}$ by 9. Setting $a_{2023}=9$, for each of the 9 possible values of $a_{2022}$, the value of $a_{2021}$ is determined, and similarly, all other values of the sequence are determined: these 9 choices thus lead to 9 possible choices of the pair $\left(a_{1}, a_{2}\right)$.