For integers $n$, the arithmetic derivative $D(n)$ is defined as follows:
- $D(p) = 1$, for any prime $p$.
- $D(mn) = D(m)n + mD(n)$, for any $m,n\in\mathbb{N}$ (Leibniz rule).
- $D(-n) = -D(n)$.
The Leibniz rule implies that $D(0) = 0$ and $D(1) = 0$.
Now consider over $\mathbb{N}$ the iteration of the function $$f(x)=x-D(x)+1.$$
The only possible fixed points $C$ of the sequence $x_n=f(x_{n-1})$ satisfy $$C=C-D(C)+1$$ that is $$D(C)=1.$$ Therefore, $C$ is a prime number. My experiments show that the sequence always converges to a prime number.
Just a few examples: $$56→−35→−22→−8→5$$ $$170105→122935→92889→30955→23805→1105→735→134→66→6→2$$ How to prove it rigorously?
Here is the top ten of attractors (so far to $2\cdot10^5$):
| prime | count | frequency |
|---|---|---|
| $2$ | $68264$ | $0.341320$ |
| $5$ | $44566$ | $0.222830$ |
| $17$ | $8246$ | $0.041230$ |
| $29$ | $5083$ | $0.025415$ |
| $97$ | $2850$ | $0.014250$ |
| $37$ | $2351$ | $0.011755$ |
| $271$ | $1822$ | $0.009110$ |
| $193$ | $1631$ | $0.008155$ |
| $181$ | $1443$ | $0.007215$ |
| $73$ | $1181$ | $0.005905$ |
How to explain the previous frequencies?
Many thanks.
Addendum 1
A natural extention of the function could be $$g(x)=x-D(x)+sgn(x).$$ In this case, one can work along $\mathbb{Z}$ and the attractors become $$A=\{0\}∪\{p,−p : p\,\,prime\}.$$ Naturally, the spectrum of the attractors changes. In particular, $p$ and $-p$ will have the same relative frequency. In the testing range $[-10^5,10^5]$, the fixed point $0$ reaches the $13$-th place, with $773$ occurrences. The condition to reach $0$ is simple: $D(n)=n+1$; for example, $D(30)=31$.
Addendum 2
Another similar function is $$f(x)=x-2D(x)+2,$$ for which one has $$f(2m)=2m-2D(2m)+2=2m-2(m+2D(m))+2=2-4D(m),$$ that is always even; therefore, the basin of attraction of the prime $2$ is exactly the $50\%$.