One sort of obvious observation is that shuffling the digits of the input number $N$ doesn't affect the value of $f(N)$ at all.*
This alone significantly limits the number of possible values $f(N)$ can take. While there are $10^8$ distinct non-negative decimal numbers with up to eight digits (or, equivalently, $10^8$ distinct octuples of decimal digits), the number of distinct inputs ignoring the order of the digits is only ${10+8-1 \choose 8} = 24310$.
Also, on every step of the iteration, the number of values that the $k$ times iterated function $f^{(k)}(N)$ can take becomes more and more restricted. For example, for any $0 \le N < 10^8$:
- The last digit of $f(N)$ must be at least $1$, the rest of its digits can sum to at most $8$, and it can contain at most one digit greater than $4$. (And if it does contain a digits greater than $4$, it cannot also contain all digits from $0$ to $4$, as that would violate the sum condition!) Also, the digits of $f(N)$ cannot all be equal.
- Thus, the last digit of $f^{(2)}(N) = f(f(N))$ must be at least $2$ and at most $5$, and thus its first seven digits must include at least two zeros (and cannot be all zeros).
- Thus, in addition to all of the constraints above, the first digit of $f^{(3)}(N) = f(f(f(N)))$ must be at least $2$ and at most $6$, etc.
In such a fashion, one could presumably proceed to build a chain of logical arguments eventually showing that the only possible value of $f^{(8)}(N)$ is $23110105$.
Instead of doing that, though, I decided to write a simple Python script to enumerate all the possible values of $f^{(k)}(N)$ for each $k$, and in particular to print out the range of possible values of each digit. Its output looks like this:
step 1: 0-8, 0-8, 0-8, 0-8, 0-8, 0-8, 0-8, 1-8 (8943 distinct values)
step 2: 0-7, 0-7, 0-4, 0-3, 0-2, 0-1, 0-1, 2-5 (96 distinct values)
step 3: 2-6, 0-4, 0-2, 0-2, 0-2, 0-1, 0-1, 3-5 (18 distinct values)
step 4: 2-5, 1-4, 0-2, 0-2, 0-2, 0-1, 0-1, 4-5 (9 distinct values)
step 5: 2-3, 1-4, 0-2, 0-2, 0-2, 0-1, 0-0, 4-5 (6 distinct values)
step 6: 2-3, 1-3, 0-2, 0-2, 0-2, 0-1, 0-0, 4-5 (4 distinct values)
step 7: 2-3, 1-3, 1-2, 1-1, 0-1, 0-1, 0-0, 5-5 (2 distinct values)
step 8: 2-2, 3-3, 1-1, 1-1, 0-0, 1-1, 0-0, 5-5 (1 distinct value)
From the output above, we can see that the first two iterations are enough to reduce all $10^8$ possible inputs to just 96 different outputs, and the third iteration reduces those further down to just 18 choices: $23110105$, $24001104$, $31211005$, $32021004$, $32102004$, $33001104$, $40211004$, $41021004$, $41102004$, $41110105$, $42001104$, $42010014$, $50021003$, $50110104$, $50200013$, $51010014$, $51100004$ and $60100003$. The remaining five iterations are then needed to reduce these 18 values down to just one.
For a closer look at what happens during those last five iterations, a slight modification to the Python script lets it print the path that each of these 18 values takes to reach the unique fixed point as a nice Unicode tree:
┌► f(23110105) = 23110105
└─┬─ f(31211005) = 23110105
├─┬─ f(32021004) = 31211005
│ └─┬─ f(33001104) = 32021004
│ ├─── f(50110104) = 33001104
│ └─┬─ f(51010014) = 33001104
│ └─── f(60100003) = 51010014
└─┬─ f(32102004) = 31211005
├─┬─ f(24001104) = 32102004
│ └─┬─ f(41110105) = 24001104
│ ├─── f(50021003) = 41110105
│ └─── f(50200013) = 41110105
├─── f(40211004) = 32102004
├─── f(41021004) = 32102004
├─── f(41102004) = 32102004
├─┬─ f(42001104) = 32102004
│ └─── f(51100004) = 42001104
└─── f(42010014) = 32102004
In this tree, the fixed point $23110105$ is on the first row at the top, marked by the arrow tip. Underneath it is the value $31211005$, which is the only one of the 18 values (other than $23110105$ itself) that yields $23110105$ when $f$ is applied to it. Below that are the values $32021004$ and $32102004$ that both yield $23110105$ when fed through $f$, and below each of those are all the inputs that yield each of them in turn, and so on.
To be honest, though, I'm not convinced that there's any particular insight to be gleaned from this graph. Certainly I don't see any obvious or natural candidates for a monotone property $p$ such that $p(f(N)) \ge p(N)$ (with the inequality being strict unless $N$ is the unique fixed point of $f$), although that of course doesn't rule out the possibility that someone smarter than me might find one.
(Of course, given that iteration of $f$ clearly does converge, we could always artificially construct such a property $p$: for example, we could trivially let $p(N)$ be the highest $k \le 8$ such that $N = f^{(k)}(N')$ for some $0 \le N' < 10^8$. But such an artificial construction would yield no useful insight whatsoever, nor would it make proving the convergence of the iteration any easier.)
So it seems that the permutation invariance mostly explains the rapid initial convergence of the iteration into a small number of possible values, and may also explain the general statistical behavior of the size of the image of $f^{(k)}$ as a function of $k$. What it does not explain is the final convergence to just a single fixed point, as opposed to multiple fixed points or limit cycles.
In fact, I believe that this may be just a coincidence, and that arbitrary minor changes to the definition of $f$ may change the eventual result of the iteration.
To test this hypothesis, I decided to see what would happen if we instead considered the function $g(N) = f(N)-1$. (Recall that the last digit of $f(N)$ is always at least $1$, so $f(N)$ and $g(N)$ only differ in their last digit.)
As it turns out, in this case the iteration converges in nine steps to a limit set of five values:
step 1: 0-8, 0-8, 0-8, 0-8, 0-8, 0-8, 0-8, 0-7 (8943 distinct values)
step 2: 0-8, 0-7, 0-4, 0-3, 0-2, 0-1, 0-1, 0-4 (92 distinct values)
step 3: 2-7, 0-4, 0-3, 0-3, 0-2, 0-1, 0-1, 1-4 (17 distinct values)
step 4: 2-6, 0-4, 0-3, 0-3, 0-2, 0-1, 0-1, 2-4 (13 distinct values)
step 5: 2-5, 0-4, 0-3, 0-3, 0-2, 0-1, 0-1, 2-4 (11 distinct values)
step 6: 2-4, 0-4, 0-3, 0-3, 0-2, 0-1, 0-0, 2-4 (9 distinct values)
step 7: 2-4, 0-4, 0-3, 0-3, 0-2, 0-0, 0-0, 2-4 (7 distinct values)
step 8: 2-4, 0-4, 0-3, 0-2, 0-2, 0-0, 0-0, 2-4 (6 distinct values)
step 9: 2-4, 0-4, 0-3, 0-2, 0-2, 0-0, 0-0, 2-4 (5 distinct values)
These five limit values consist of two fixed points ($23111004$ and $31220003$, the latter having no other ancestors within the range of $g^{(3)}$) and a single cycle of three values ($24002002$, $40301002$ and $41111004$), as show in the tree below (slightly hand-edited from the output of the Python code to show the cycle more clearly):
┌► g(23111004) = 23111004
└─┬─ g(32111004) = 23111004
├─┬─ g(41200103) = 32111004
│ └─┬─ g(50200102) = 41200103
│ └─── g(52000002) = 50200102
└─── g(42100013) = 32111004
┌─┬─ g(24002002) = 40301002
│ └─┬─ g(41111004) = 24002002
└─► └─┬─ g(40301002) = 41111004
└─┬─ g(40220002) = 40301002
└─┬─ g(32030002) = 40220002
└─┬─ g(33010103) = 32030002
├─── g(51010103) = 33010103
└─┬─ g(51100013) = 33010103
└─┬─ g(61000002) = 51100013
└─── g(70000001) = 61000002
─► g(31220003) = 31220003
Given this observation, I'm inclined to say that the fact that the limit set of the original iterated function $f$ consists of a single fixed point is mostly just pure luck, aided by the rapid shrinking of the iterated image due to the permutation invariance of the function.
*) Except for the possible ambiguity regarding whether leading zeros should be counted or not. Above, I'm assuming that they should be counted, and that all inputs to $f$ should effectively be zero-padded to eight digits. In any case, this only affects the first few iterations, since it's easy to show that, whether leading zeros are counted or not, $f^{(2)}(N)$ must contain at least one non-leading zero for all $N$, and therefore $f^{(3)}(N)$ and all further iterates must have eight digits with no leading zeros.
n>=10
case seems to start getting regular, and I feel like there's potential for a theorem of the form "there are always exactly two fixed points whenn>=10
(exceptn=11
) and they look like this" coming out of this. I may think about this some more and ask another question about it. $\endgroup$n=8
case and asks about convergence to fixed points, whereas I'm focusing on fixed points in general and say nothing of convergence. $\endgroup$