- #1
magneto1
- 102
- 0
I ran into an interesting problem while working on a problem set. Given a $10$-digit number $n$ (for our purpose, we will allow $n$ to have leading $0$'s, so you can treat this as a string of $10$-digits). Define a function $f$ that maps $n$ to another $10$-digit number $m$ written in its decimal form $\overline{m_0m_1\dotso m_9}$ where the digit $m_i$ is the number of digit $i$ in $n$.
E.g. $n = 1,890,091,000$. This number has $5$ zeroes, $2$ ones,
$1$ eight, and $1$ nine. So, $f(n) = 5,200,000,012$.
Suppose we iterate this indefinitely (and we can do that quickly using some Mathematica code). From some initial investigation, two possibilities occur.
(a) We will come to a $t$ where $f(t) = t$. This happens when $t = 6,210,001,000$.
or (b) We will come to a $t$ where $f(t) = f(f(t))$. This happens when $t = 6,300,000,100$ or $t=7,101,001,000$.
Since the number of $10$-digit integers is finite, $f \circ f \circ \dotso$ has to form a cycle. From above, there is a cycle of length $1$ and length $2$. Is there any $10$-digit $n$ where repeatedly applying $f$ will lead to a cycle whose length $\geq 3$?
E.g. $n = 1,890,091,000$. This number has $5$ zeroes, $2$ ones,
$1$ eight, and $1$ nine. So, $f(n) = 5,200,000,012$.
Suppose we iterate this indefinitely (and we can do that quickly using some Mathematica code). From some initial investigation, two possibilities occur.
(a) We will come to a $t$ where $f(t) = t$. This happens when $t = 6,210,001,000$.
or (b) We will come to a $t$ where $f(t) = f(f(t))$. This happens when $t = 6,300,000,100$ or $t=7,101,001,000$.
Since the number of $10$-digit integers is finite, $f \circ f \circ \dotso$ has to form a cycle. From above, there is a cycle of length $1$ and length $2$. Is there any $10$-digit $n$ where repeatedly applying $f$ will lead to a cycle whose length $\geq 3$?
Last edited: