MathLabs

Problem 1

For a positive integer mm, denote by S(m)S(m) and P(m)P(m) the sum and product, respectively, of the digits of mm. Show that for each positive integer nn, there exist positive integers a1,a2,…,ana_1,a_2,\ldots,a_n satisfying S(a1)<S(a2)<⋯<S(an)S(a_1)<S(a_2)<\cdots<S(a_n) and S(ai)=P(ai+1)S(a_i)=P(a_{i+1}) for i=1,2,…,ni=1,2,\ldots,n, where an+1=a1a_{n+1}=a_1.
Step 1 of 3: Construct the middle numbers
ai:  2 occurs k+i−2 times,1 occurs 2k+i−1−2(k+i−2) times(2≤i≤n)a_i:\;2\text{ occurs }k+i-2\text{ times},\quad 1\text{ occurs }2^{k+i-1}-2(k+i-2)\text{ times}\quad(2\le i\le n)
Detailed analysis

Choose a sufficiently large positive integer k. For each index from 2 through n, let the digits of a_i consist only of twos and ones, with the displayed multiplicities. The required number of ones is nonnegative when k is large enough.