退出

How can I prove that $0$, $324$, and $5184$ are the only fixed points of $f(n)=(E(n)O(n))^2$? Where $E$ and $O$ are even and odd digit sum of a number

数论 Math StackExchange 3 票 2 回答 79 浏览 提问者: SHUV JNYANDEEP SAHU 2026-07-17 13:55
number-theory discrete-mathematics dynamical-systems

问题内容

I have been studying the following digit dynamical system.

Let $E(n)$ denote the sum of the even digits of $n$, and let $O(n)$ denote the sum of the odd digits of $n$.

Define

$$ f(n)=\big(E(n)\,O(n)\big)^2. $$

I am interested in the dynamical system obtained by repeated iteration

$$ n,\;f(n),\;f^{2}(n),\;f^{3}(n),\;\ldots $$

rather than only the function itself.

By exhaustive computation, I found the following fixed points:

$$ 0,\qquad324,\qquad5184. $$

Indeed,

$$ E(324)=2+4=6,\qquad O(324)=3, $$

so

$$ f(324)=(6\cdot3)^2=324. $$

Similarly,

$$ E(5184)=8+4=12,\qquad O(5184)=5+1=6, $$

so

$$ f(5184)=(12\cdot6)^2=5184. $$

Also,

$$ f(0)=0. $$

Apart from these, exhaustive computation up to at least $10^7$ found no additional fixed points.

Some additional computational observations are:

  • $0$ is an absorbing state.
  • No nontrivial cycles have been found by exhaustive computation up to at least $10^7$.
  • Many integers eventually reach one of the three fixed points.

For example,

$$ 16\rightarrow36\rightarrow324, $$

$$ 47\rightarrow784\rightarrow7056\rightarrow5184, $$

and

$$ 17\rightarrow0. $$

The dynamics also appear to depend primarily on the state pair $(E(n),O(n))$ rather than directly on $n$.

The terminal fixed points satisfy

$$ E(n)O(n)=18 $$

for $324$, and

$$ E(n)O(n)=72 $$

for $5184$.

Furthermore, if $n$ has $d$ digits, then

$$ E(n)\le9d,\qquad O(n)\le9d, $$

so

$$ f(n)\le(81d^2)^2, $$

whereas

$$ n\ge10^{d-1}. $$

This suggests that no sufficiently large integer can be a fixed point.

Question

Is there a rigorous proof that the only fixed points of

$$ f(n)=\big(E(n)\,O(n)\big)^2 $$

are

$$ 0,\;324,\;5184? $$

If so, what is the simplest proof? If not, what methods would be appropriate for proving or disproving this?


Additional note

I have documented this project in a GitHub repository containing the Python programs used for exhaustive searches, cycle detection, state-space analysis, graphs, computational results, and additional notes related to this digit dynamical system.

Repository:

https://github.com/sahushuvjnyandeep-png/Parity-State-Dynamics

The repository is provided only as supplementary material; the mathematical question above is self-contained.

回答 (2)

SomeCallMeTim 3 票 2026-07-17 14:20 原文

As lulu mentions, an exhaustive search suffices. Let's make the necessary searching explicit.

You note that $f(n)\leq (81d^2)^2$ while $n\geq 10^{d-1}$, so $f(n)<n$, in particular $n$ is not a fixpoint, if $$ 10^{d-1}>(81d^2)^2 = 6561d^4. $$ Taking $\log_{10}$ and adding $1$ on both sides yields $$d > 1+3.81697+4\cdot \log_{10}(d), $$ which can easily be checked to be satisfied for $d=9$, and as the left hand side grows faster than the right hand side (look at the derivative of both sides), it holds for all $d\geq 9$. It should be easy to search $n<10^9$ using Paul's comment.

artemetra 1 票 2026-07-17 15:09 原文

Using a quick Python script I've checked all $n<10^8$, and these graphs numerically confirm the findings of SomeCallMeTim et al. The graph of $y=n$ exceeds $y=f(n)$ quite early, with the last time $f(n)>n$ being for $n=199988$ and $f(n)=200704$.

Graph for $n < 10^7$ (for $10^8$ it looks identical, just that $f(n)$ is even harder to see) Comparison of n vs f(n), n=0..10^7

Graph for $n < 3\cdot 10^5$ Comparison of n vs f(n), n=0..3*10^5