If $n'$ denotes the arithmetic derivative of non-negative integer $n$, and $n''=(n')'$, then solve the following equation $$n''=n'.$$

What I have found, you can read in one minute! I have tried to explain it very detailed so anyone, even with a little knowledge of elementary number theory (like me), can follow the steps.

$n=0$ and $n=1$ are solutions. It is known that for a natural number $n>1$ with prime factorization of $\prod_{i=1}^{k} p_i^{a_i}$ arithmetic derivative is $$n'=n \sum_{i=1}^{k} \frac{a_i}{p_i}. \tag{1}$$

Let $m=n'$, then equation becomes $m'=m$. Let prime factorization of $m$ be $\prod_{j=1}^{l} q_j^{b_j}$. Then from equation $(1)$ we get $$\frac{b_1}{q_1}+ \frac{b_2}{q_2}+... + \frac{b_l}{q_l}=1. \tag{2}$$

This equation implies that $q_j \ge b_j$. Multiply both sides of the equation $(2)$ by $q_1 q_2 ... q_{l-1}$. It follows that $q_1 q_2 ... q_{l-1}\frac{b_l}{q_l}$ is an integer. Thus $q_l | b_l$. Hence $b_l \ge q_l$ and $b_l=q_l$. Subsequently $b_1=b_2=...=b_{l-1}=0$ and $m=q^q$ for some prime number $q$.

Thus we have $n'=m=q^q$ and $n\sum_{i=1}^{k} \frac{a_i}{p_i}=q^q$ or $$\prod_{i=1}^{k} p_i^{a_i-1}\sum_{i=1}^{k} \left( p_1 p_2 ... p_k \frac{a_i}{p_i} \right)=q^q. \tag{3}$$ Notice that if $p_i \neq q$ is a prime divisor of $n$, then $a_i=1$. We claim that if $q$ is a prime divisor of $n$, then its the only one. If $q \mid n$ then $n$ is in the form $$n=p_1p_2...p_kq^a,$$

Where $\gcd(q, p_i)=1$. Now its easy to see from equation $(3)$ that $a \le q$ and dividing both sides of it by $q^{a-1}$ gives $$q\sum_{i=1}^{k} \left( \frac{p_1 p_2 ... p_k}{p_i} \right)+p_1 p_2 ... p_k a=q^{q-a+1}.$$Therefore, $q|a$, which leads to $a \ge q$ and $q=a$. Thus $$\sum_{i=1}^{k} \left( \frac{p_1 p_2 ... p_k}{p_i} \right)+p_1 p_2 ... p_k=1,$$Which is a contradiction and $n=q^q$. Thus $n=q^q$ is a solution to the original equation, where $q$ is a prime number.

If $q \nmid n$, then equation $(3)$ gives

$$\sum_{i=1}^{k} \left( \frac{p_1 p_2 ... p_k}{p_i} \right)=q^q,$$Where I am stuck with.

Edit: According to @user49640 comment, there are some solutions of the form $n=2p$, where $p=q^q-2$ is a prime. For example for $q=7$ and $q=19$. See also @Thomas Andrews answer for an another solution not in the form $n=p^p$.

Look at this solution I found:

$$(2\times17431\times147288828839626635378984008187404125879)'=29^{29}$$


Solution 1:

We have that

$$(3\cdot 29\cdot 25733)'=3\cdot 29 + 3\cdot 25733 + 29\cdot 25733=7^7$$

So you are going to get non-trivial solutions. It's probably a difficult problem to come up with all solutions.

I was looking for "3 prime" solutions. So, if $n=abc$ with $n'=ab+ac+bc=(a+c)(b+c)-c^2$. Trying to solve with $q=5$ gives:

$$(a+c)(b+c)=5^5+c^2$$

But $5^5\equiv 1\pmod{4}$ and thus $5^5+c^2$ cannot be divisible by $4$. so $a+c$ and $b+c$ cannot both be even, so one of $a,b,c$ must be $2$. We can assume $c=2$. Then we want $(a+2)(b+2)=3129=3\cdot 7\cdot 149$. No way to factor this as $mn$ with $m-2$ and $n-2$ prime. So there is no $3$-prime counter-example with $q=5$.

So I tried $q=7$ and found the above solution. It helped that $7^7+9$ has divisible by $256$, which gave me a lot of possibilities for factorizations.

There are two-prime solutions if $q^q-2$ is an odd prime.