# Arithmetic derivative

In number theory, the Lagarias arithmetic derivative or number derivative is a function defined for integers, based on prime factorization, by analogy with the product rule for the derivative of a function that is used in mathematical analysis.
There are many versions of "arithmetic derivatives", including the one discussed in this article (the Lagarias arithmetic derivative), such as Ihara's arithmetic derivative and Buium's arithmetic derivatives.

## Early history

The arithmetic derivative was introduced by Spanish mathematician Josè Mingot Shelly in 1911. The arithmetic derivative also appeared in the 1950 Putnam Competition.

## Definition

For natural numbers 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).

## Extensions beyond natural numbers

Edward J. Barbeau extended the domain to all integers by showing that the choice D(−n) = −D(n) uniquely extends the domain to the integers and is consistent with the product formula. Barbeau also further extended it to the rational numbers, showing that the familiar quotient rule gives a well-defined derivative on $\mathbb {Q}$:
    $D\!\left({\frac {m}{n}}\right)={\frac {D(m)n-mD(n)}{n^{2}}}.$
Victor Ufnarovski and Bo Åhlander expanded it to the irrationals that can be written as the product of primes raised to arbitrary rational powers, allowing expressions like $D({\sqrt {3}}\,)$ to be computed.
The arithmetic derivative can also be extended to any unique factorization domain (UFD), such as the Gaussian integers and the Eisenstein integers, and its associated field of fractions. If the UFD is a polynomial ring, then the arithmetic derivative is the same as the derivation over said polynomial ring. For example, the regular derivative is the arithmetic derivative for the rings of univariate real and complex polynomial and rational functions, which can be proven using the fundamental theorem of algebra.
The arithmetic derivative has also been extended to the ring of integers modulo n.

## Elementary properties

The Leibniz rule implies that D(0) = 0 (take m = n = 0) and D(1) = 0 (take m = n = 1).
The power rule is also valid for the arithmetic derivative. For any integers k and n ≥ 0:
    $D(k^{n})=nk^{n-1}D(k).$
This allows one to compute the derivative from the prime factorization of an integer, x=∏$_{p∈P}$p$^{np}${\textstyle x=\prod \limits _{p\in \mathbb {P} }p^{n_{p}}} (in which n$_p$=ν$_p$(x){\textstyle n_{p}=\nu _{p}(x)} is the p-adic valuation of x) :
    $D(x)=\sum \limits _{p\in \mathbb {P} }{\frac {x}{p^{n_{p}}}}n_{p}\,p^{n_{p}-1}D(p)=\sum _{\stackrel {p\vert x}{p\in \mathbb {P} }}n_{p}{\frac {x}{p}}D(p)=x\sum _{\stackrel {p\vert x}{p\in \mathbb {P} }}{\frac {n_{p}}{p}}D(p)$.
This shows that if one knows the derivative for all prime numbers, then the derivative is fully known. In fact, the family of arithmetic partial derivative ∂/∂p {\textstyle {\frac {\partial }{\partial p}}} relative to the prime number p{\textstyle p}, defined by ∂/∂p (q)=0{\textstyle {\frac {\partial }{\partial p}}(q)=0} for all primes q{\textstyle q}, except for q=p{\textstyle q=p} for which ∂/∂p (p)=1{\textstyle {\frac {\partial }{\partial p}}(p)=1} is a basis of the space of derivatives. Note that, for this derivative, we have ${\frac {\partial x}{\partial p}}=n_{p}{\frac {x}{p}}$.
Usually, one takes the derivative such that D(p)=1{\textstyle D(p)=1} for all primes p, so that
    $D=\sum \limits _{p\in \mathbb {P} }{\frac {\partial }{\partial p}}{\text{, and }}D(x)=x\sum \limits _{p\in \mathbb {P} }{\frac {n_{p}}{p}}$.
With this derivative, we have for example:
    $D(60)=D(2^{2}\cdot 3\cdot 5)=60\cdot \left({\frac {2}{2}}+{\frac {1}{3}}+{\frac {1}{5}}\right)=92,$
or
    $D(81)=D(3^{4})=4\cdot 3^{3}\cdot D(3)=4\cdot 27\cdot 1=108.$
And the sequence of number derivatives for x = 0, 1, 2, … begins (sequence A003415 in the OEIS):
    $0,0,1,1,4,1,5,1,12,6,7,1,16,1,9,\ldots$

## Related functions

The logarithmic derivative $\operatorname {ld} (x)={\frac {D(x)}{x}}=\sum _{\stackrel {p\,\mid \,x}{p\in \mathbb {P} }}{\frac {\nu _{p}(x)}{p}}$ is a totally additive function: $\operatorname {ld} (x\cdot y)=\operatorname {ld} (x)+\operatorname {ld} (y).$
Let $p$ be a prime. The arithmetic partial derivative of $x$ with respect to $p$ is defined as $D_{p}(x)={\frac {\nu _{p}(x)}{p}}x.$ So, the arithmetic derivative of $x$ is given as $D(x)=\sum _{\stackrel {p\,\mid \,x}{p\in \mathbb {P} }}D_{p}(x).$
Let $S$ be a nonempty set of primes. The arithmetic subderivative of $x$ with respect to $S$ is defined as $D_{S}(x)=\sum _{\stackrel {p\,\mid \,x}{p\in S}}D_{p}(x).$ If $S$ is the set of all primes, then $D_{S}(x)=D(x),$ the usual arithmetic derivative. If $S=\{p\}$, then $D_{S}(x)=D_{p}(x),$ the arithmetic partial derivative.
An arithmetic function $f$ is Leibniz-additive if there is a totally multiplicative function $h_{f}$ such that $f(mn)=f(m)h_{f}(n)+f(n)h_{f}(m)$ for all positive integers $m$ and $n$. A motivation for this concept is the fact that Leibniz-additive functions are generalizations of the arithmetic derivative $D$; namely, $D$ is Leibniz-additive with $h_{D}(n)=n$.
The function $\delta$ given in Section 3.5 of the book by Sandor and Atanassov is, in fact, exactly the same as the usual arithmetic derivative $D$.

## Inequalities and bounds

E. J. Barbeau examined bounds on the arithmetic derivative and found that
    $D(n)\leq {\frac {n\log _{2}n}{2}}$
and
    $D(n)\geq \Omega (n)\,n^{\frac {\Omega (n)-1}{\Omega (n)}}$
where Ω(n), a prime omega function, is the number of prime factors in n. In both bounds above, equality always occurs when n is a power of 2.
Dahl, Olsson and Loiko found the arithmetic derivative of natural numbers is bounded by
    $D(n)\leq {\frac {n\log _{p}n}{p}}$
where p is the least prime in n and equality holds when n is a power of p.
Alexander Loiko, Jonas Olsson and Niklas Dahl found that it is impossible to find similar bounds for the arithmetic derivative extended to rational numbers by proving that between any two rational numbers there are other rationals with arbitrary large or small derivatives (note that this means that the arithmetic derivative is not a continuous function from $\mathbb {Q}$ to $\mathbb {Q}$).

## Order of the average

We have
    $\sum _{n\leq x}{\frac {D(n)}{n}}=T_{0}x+O(\log x\log \log x)$
and
    $\sum _{n\leq x}D(n)=\left({\frac {1}{2}}\right)T_{0}x^{2}+O(x^{1+\delta })$
for any δ > 0, where
    $T_{0}=\sum _{p}{\frac {1}{p(p-1)}}.$

## Relevance to number theory

Victor Ufnarovski and Bo Åhlander have detailed the function's connection to famous number-theoretic conjectures like the twin prime conjecture, the prime triples conjecture, and Goldbach's conjecture. For example, Goldbach's conjecture would imply, for each k > 1 the existence of an n so that D(n) = 2k. The twin prime conjecture would imply that there are infinitely many k for which D$^2$(k) = 1.