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 2 of 3: Compute the middle sums and products
S(ai)=2k+i−1,P(ai)=2k+i−2(2≤i≤n)S(a_i)=2^{k+i-1},\qquad P(a_i)=2^{k+i-2}\quad(2\le i\le n)
Detailed analysis

The digit sum is twice the number of twos plus the number of ones, while the digit product is two to the number of twos. The chosen multiplicities therefore give the displayed values.