Question concerning a product of digits algorithm

33 Views Asked by At

Define a function $f\colon \mathbb{N} \to \mathbb{N} $ as follows: for a positive integer $n$, we express $n$ in terms of its decimal expansion, say $$n=a_0 + a_1 10 +\cdots +a_d 10^d $$ We define $f(n)=a_0 a_1 \cdots a_d $. Note that for each positive integer $n$, there is a positive integer $k$ such that $$f(n)>\cdots>f^k (n)=f^{k+1}(n)=\cdots$$ For the purposes of this question, let's call $k$ the length of $n$. So for example, when $n=2334$, we calculate $$f(2334)=72,\quad f(72)=14,\quad f(14)=4,\quad\text{and}\quad f(4)=4$$ So the length of $2334$ is $3$. Viewing length as a function on $\mathbb{N}$, is it bounded above? If not, then what is the largest length possible and which integer attains this length?