On the arithmetic differential equation $n''=n'$ 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&gt;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}$$
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.
For all $k\geq 2$, with $\{p_k\}$  any set of $n+1$ distinct primes,
and $a_k$ any set of $k$ positive integers such that no $a_k$ is a multiple of the corresponding $p_k$,
$$
\sum{\frac{a_k}{p_k} \neq 1}
$$
The proof is by induction, starting with a basis at $n=1$:  $1-\frac{a_1}{p_1}$ is a fraction with denominator $p_1$, say $\frac{r_1}{p_1}$ with $0&lt;r_1&lt;p_1$.  So for $\sum_1^2{\frac{a_k}{p_k} = 1}$ to hold, you must have
$$
\frac{a_2}{p_2}=\frac{r_1}{p_1}\\ a_2 p_1 = r_1 p_2
$$
Since $p_2$ is coprime with $p_1$, for this to hold  $r_1 = mp_1$. But $r_1 &lt; p_1$, so this is a contradiction, and there cannot be such a combination.

the proof of the induction step is very similar, relying on the facts that the product of several primes none of which match $p_{n+1}$ cannot be divisible by $p_{n+1}$ and the "deficiency" of $\sum_1^n\frac{a_k}{p_k}$ must have a denominator of the form of the product of the $p_k$.

Therefore, the only solutions to 
$$
n'=n
$$
are of the form $n=p^p$, where $p$ is prime.

So for your equation, we must lok for number whose aritmetic derivatives are of the form $p^p$.
We see immediately that for such a number w, if 
$w=p^t\prod p_k^{a_k}$ with all the $p_k$ distinct from $p$,then all the $a_k = 1$ (otherwise, a prime other than $p$ will creep into $w'$). 

THus the problem of finding a solution of a form other than $p^p$ comes down to finding a collection of primes $\{p_k\}, 1\leq k \leq s$, a distinct prime $p$, and an integer exponent $t&gt;0$ such that
$$
\sum_{k=1}^s\frac1{p_k}+\frac1t = p^{p-t}
$$
Clearly $p^{p-t}&lt; p^p$, otherwise we get back our solution $p^p$.

Let's see how this works, by trying to do this for $p=3$. If $t=2$, then we want
$$
\sum_{k=1}^s\frac1{p_k}+\frac12 = p^{3-2}=3
$$
It is easy to find a set of primes wose reciprocals add to more than $\frac52$ but then the denominator of that sum of reciprocals is a large number having all those primes as factors.  In order to get the full sum to be the simple fraction $\frac52$, $t$ would have to be at least half as big as that large number, thus it would need to be more than $3$. Since $t$ must be less than $p$, this won't work.

So for this to work, $t$ must be a large number, forcing $p$ to be a large prime, thus requiring very many terms in the sum of reciprocal primes, in turn requiring $t$ to be a much larger number.  This argument can be formalized, to show that 
$$
n=p^p$$
is the only way to have 
$$
n''=n'
$$