
Arithmetic Derivative
The arithmetic derivative is defined by
- $p^\prime = 1$ for any prime $p$
- $(ab)^\prime = a^\prime b + ab^\prime$ for all integers $a, b$ (Leibniz rule)
For example, $20^\prime = 24$.
Find $\sum \operatorname{\mathbf{gcd} }(k,k^\prime)$ for $1 \lt k \le 5 \times 10^{15}$.
Note: $\operatorname{\mathbf{gcd} }(x,y)$ denotes the greatest common divisor of $x$ and $y$.