Ruby has a non-negative integer $n$. In each second, Ruby replaces the number she has with the product of all its digits. Prove that Ruby will eventually have a single-digit number or $0$. (e.g. $86\rightarrow 8\times 6=48 \rightarrow 4 \times 8 =32 \rightarrow 3 \times 2=6$) Proposed by Wong Jer Ren
Problem
Source: JOM 2023 P2
Tags: algebra
20.02.2023 06:51
You just need to notice that the number always decreases. If we have $n = \overline{a_1 \ldots a_k} = 10^{k-1} a_1 + \cdots + 10^1 a_{k-1} + a_k$ then next step becomes $a_1 a_2 \cdots a_k < 10^{k-1} a_1 \leq n$ (since $0 \leq a_2,\ldots,a_k \leq 9$ and $a_1 > 0$) so the number always decreases and this process can only stop when $n$ is single digit (or zero).
22.02.2023 05:51
For some reason I decided to do this instead. Assuming 10^k (a_k) + 10^(k-1) (a_k-1) + ... + 10(a_1) + a_0 > a_k (a_k-1) ... (a_1) (a_0) is true for all 1 digit a_i where 0 <= i <= k. k>=2 Checking for k+1: 10^(k+1) (a_k+1) + 10^k (a_k) + ... + 10(a_1) + a_0 > 10^(k+1) (a_k+1) + a_k (a_k-1) ... (a_1) (a_0) We need to prove 10^(k+1) (a_k+1) + a_k (a_k-1) ... (a_1) (a_0) > a_k+1 (a_k) ... (a_1) (a_0) 10^(k+1) (a_k+1) > a_k+1 (a_k) ... (a_1) (a_0) - a_k (a_k-1) ... (a_1) (a_0) 10^(k+1) (a_k+1) > a_k (a_k-1) ... (a_1) (a_0) [a_k+1 -1] 10^(k+1) > a_k (a_k-1) ... (a_1) (a_0) [(a_k+1 -1) / a_k+1] Since a_k (a_k-1) ... (a_1) (a_0) have at most k digits and [(a_k+1 -1) / a_k+1] is smaller than 1, we know that 10^(k+1) > a_k (a_k-1) ... (a_1) (a_0) [(a_k+1 -1) / a_k+1] this is true. Base case k=2: a,b are 1 digit 10a+b >ab 10a > ab-b = b(a-1) 10 > b [(a-1)/a] True Define p(n) as product of all digits of n By induction, we have proven that p(n) < n for n having 2 or more digits. The only case when p(n) = n is when n have 1 digit. QED I tried to change my post into LATEX, but it says new users are not allowed to post images