Question 2
How many nine-digit numbers $\overline{a_1a_2\cdots a_9}$ have distinct nonzero digits and satisfy all the following conditions: $a_1\in\{1,2\}$; $a_9\in\{8,9\}$; and, for $1\lt k\lt9$, $a_k\in\{k-1,k,k+1\}$?


VTMO · VTMO 2026 - Grade 9 - Semifinal - SET 3 - Self-study
