What are the fixed points of the arithmetic derivative over the non-negative integers?

84 Views Asked by At

I just watched When the derivative of a number is not zero -- The arithmetic derivative by Michael Penn.

I like to explore things visually and computationally, so I found this recursive implementation of the arithmetic derivative.

f=lambda n,p=2:+(n*n>1)and(n%p and f(n,p+1)or p*f(n/p)+n/p)

Taking a kind of graph theory approach, I constructed a directed graph of each integer i from 0 to 10000 where the nodes are the integers. Two integers i,j share an edge if j = f(i), where f is the arithmetic derivative.

import networkx as nx
import matplotlib.pyplot as plt
import sys

sys.setrecursionlimit(10000)


f=lambda n,p=2:+(n*n>1)and(n%p and f(n,p+1)or p*f(n/p)+n/p)


g = nx.DiGraph()

rec_depth = []
for i in range(10001):
    print(i)
    try:
        g.add_edge(i, f(i))
    except RecursionError:
        print('Blargh!')
        rec_depth.append(i)
        continue

nx.draw(g, node_size=1)
plt.savefig('arithmetic_derivatives.pdf')
plt.close()

The original author of this code noted that often the recursion depth set in Python is exceeded by this function, so you may note that below I set the recursion limit to 10000 and created a list to accumulate any cases that were missed. With this recursion limit I found no exceptions. But if you wish to tinker with this code you may want to increase/decrease that limit.

Anyway, this plot below is the saved output. You can see four loops. We know from the basic properties that $0 = f(0)$ had to be one of them.

enter image description here

Computationally I found these fixed points:

>>> [i for i in g.edges() if i[0] == i[1]]
[(0, 0), (4, 4.0), (27, 27.0), (3125, 3125.0)]

OEIS did not show any results for this as a sequence.

What are the fixed points of the arithmetic derivative over the non-negative integers?

2

There are 2 best solutions below

0
On BEST ANSWER

(I finally got around to turning my brain on.)

Any fixed point must be a prime power. Indeed, if $p \mid n$, then say $n = f(n) = f(pk)$; then $f(n) = p f(k) + k f(p) = p f(k) + k = pk$. Therefore $p f(k) = (p-1)k$, so $p \mid k$ or $f(k) = 0$ (i.e. $k=1$, which you can prove by induction). Inductively $n$ is a power of $p$.

Then just find $f(p^k)$ explicitly (by induction), and show that it's equal to $p^k$ iff $k$ is equal to $p$.

1
On

I recalled from the video I mentioned in the question that Michael shows that the arithmetic derivative satisfies the power rule:

$$f(a^b) = ba^{b-1}$$

Well, if $a = b = p$ where $p$ is any prime, then

$$f(p^p) = pp^{p-1} = p^{p-1+1} = p^p$$

As Patrick pointed out in the comments of the original post, the sequence of primes to the power of themselves is A051674 on OEIS.