Question 1
For a positive integer $m$, let $S(m)$ and $P(m)$ be the sum and product of its digits. Show that for every positive integer $n$ there exist positive integers $a_1,\ldots,a_n$ such that
$$S(a_1)\lt S(a_2)\lt \cdots\lt S(a_n),\qquad S(a_i)=P(a_{i+1})\quad(1\le i\le n),$$
where $a_{n+1}=a_1$.
Proposed by the Problem Committee of the Japan Mathematical Olympiad Foundation.
$$S(a_1)\lt S(a_2)\lt \cdots\lt S(a_n),\qquad S(a_i)=P(a_{i+1})\quad(1\le i\le n),$$
where $a_{n+1}=a_1$.
Proposed by the Problem Committee of the Japan Mathematical Olympiad Foundation.