This site is supported by donations to The OEIS Foundation.

# Arithmetic derivative

In number theory, the arithmetic derivative, or number derivative, is an arithmetic function defined for natural numbers, based on their prime factorization, and a product rule by analogy with the product rule for the derivative of a function that is used in analysis.

## Arithmetic derivative of natural numbers

### Definition

${\displaystyle p'\,\equiv \,1\,}$

for any prime ${\displaystyle \scriptstyle p.\,}$

${\displaystyle (ab)'\,\equiv \,a'b+ab'\,}$

for any ${\displaystyle \scriptstyle a,\,b\,\in \,\mathbb {N} }$.

Considering a natural number's prime factorization

${\displaystyle n=\prod _{i=1}^{\omega (n)}{p_{i}}^{e_{i}},\,}$

where ${\displaystyle \scriptstyle \{p_{1},\,\ldots ,\,p_{\omega (n)}\}\,}$ are the distinct prime factors of ${\displaystyle \scriptstyle n\,}$, ω(n) is the number of distinct prime factors of ${\displaystyle \scriptstyle n\,}$ and ${\displaystyle \scriptstyle \{e_{1},\,\ldots ,\,e_{\omega (n)}\}\,}$ are positive integers,

its arithmetic derivative is thus given by

${\displaystyle n'=\sum _{i=1}^{\omega (n)}e_{i}p_{1}^{e_{1}}\cdots p_{i}^{e_{i}-1}\cdots p_{\omega (n)}^{e_{\omega (n)}}=\sum _{i=1}^{\omega (n)}{\frac {e_{i}}{p_{i}}}n=n\sum _{i=1}^{\omega (n)}{\frac {e_{i}}{p_{i}}}.\,}$

### Arithmetic derivative of 1

By the Leibniz rule

${\displaystyle 1'=(1\cdot 1)'=1'\cdot 1+1\cdot 1'=2\cdot 1',\,}$

thus

${\displaystyle 1'=0.\,}$

Also

${\displaystyle 1'=1\ \sum _{i=1}^{\omega (1)}{\frac {e_{i}}{p_{i}}}=1\sum _{i=1}^{0}{\frac {e_{i}}{p_{i}}}=1\cdot 0=0,\,}$

since the empty sum is 0.

### Arithmetic derivative of -1

By the Leibniz rule

${\displaystyle 0=1'=((-1)\cdot (-1))'=-2\cdot (-1)',\,}$

thus

${\displaystyle (-1)'=0.\,}$

### Arithmetic derivative of -n

By the Leibniz rule

${\displaystyle (-n)'=((-1)\cdot n)'=(-1)'\cdot n+(-1)\cdot n'=-n',\,}$

thus

${\displaystyle (-n)'=-n'.\,}$

### Arithmetic derivative of 0

Unlike the functional derivative of analysis, the arithmetic derivative of a sum is not the sum of the arithmetic derivatives, so the following

${\displaystyle 0'=(n+(-n))'=n'+(-n)'=n'-n'=0,\,}$

thus

${\displaystyle 0'=0\,}$

is a fallacious 'proof'. But the result is true:

${\displaystyle 0'=(-0)'=-0'\,}$

thus

${\displaystyle 2\cdot 0'=0\,}$

so

${\displaystyle 0'=0.\,}$

E. J. Barbeau was the first to formalize this definition. He extended it to all integers by proving that ${\displaystyle \scriptstyle (-x)'\,=\,-x'\,}$ uniquely defines the derivative over the integers. Barbeau also further extended it to rational numbers. Victor Ufnarovski and Bo Åhlander expanded it to certain algebraic numbers. In these extensions, the formula above still applies, but the exponents ${\displaystyle \scriptstyle e_{i}\,}$ are allowed to be arbitrary rational numbers.

### Properties

#### Arithmetic derivative of 0 or a unit (1, -1)

The arithmetic derivative of ${\displaystyle \scriptstyle n\,}$ is zero if and only if ${\displaystyle \scriptstyle n\,}$ is zero or a unit (i.e., an invertible element).

#### Arithmetic derivative of integer primes

An integer prime is a unit (1, -1) times a positive prime ${\displaystyle \scriptstyle p\,}$.

The arithmetic derivative of an integer prime (a unit (1, -1) times a positive prime ${\displaystyle \scriptstyle p\,}$) is that unit (if and only if rule)

${\displaystyle (p)'\,=\,p'\,=\,1,\,}$
${\displaystyle (-p)'\,=\,-p'\,=\,-1.\,}$

#### Arithmetic second derivative of integer primes

The arithmetic second derivative of an integer prime is thus zero (if and only if rule)

${\displaystyle (p)''\,=\,p''\,=\,1'\,=\,0,\,}$
${\displaystyle (-p)''\,=\,-p''\,=\,-1'\,=\,0.\,}$

#### Power rule (for prime powers)

The arithmetic derivative preserves the power rule (for prime powers):

${\displaystyle (p^{a})'=ap^{a-1},\,}$

where ${\displaystyle \scriptstyle p\,}$ is prime and ${\displaystyle \scriptstyle a\,}$ is a positive integer.

## Arithmetic logarithmic derivative

${\displaystyle {\frac {n'}{n}}=\sum _{i=1}^{\omega (n)}{\frac {e_{i}}{p_{i}}},\,}$

so we may define the arithmetic logarithmic derivative of ${\displaystyle \scriptstyle n\,}$ as

${\displaystyle ld(n)\equiv (\log n)'\equiv {\frac {n'}{n}}=\sum _{i=1}^{\omega (n)}{\frac {e_{i}}{p_{i}}}.\,}$

## Arithmetic derivative of rational numbers

For any nonzero ${\displaystyle \scriptstyle n\,}$

${\displaystyle 0=1'={\bigg (}{\frac {n}{n}}{\bigg )}'=n'{\bigg (}{\frac {1}{n}}{\bigg )}+n{\bigg (}{\frac {1}{n}}{\bigg )}'\,}$

thus

${\displaystyle {\bigg (}{\frac {1}{n}}{\bigg )}'=-{\frac {n'}{n^{2}}}.\,}$

For any ${\displaystyle \scriptstyle a\,\in \,\mathbb {Z} ,\,b\,\in \,\mathbb {N^{+}} \,}$ (quotient rule), we have

${\displaystyle {\bigg (}{\frac {a}{b}}{\bigg )}'=a'{\bigg (}{\frac {1}{b}}{\bigg )}+a{\bigg (}{\frac {1}{b}}{\bigg )}'={\frac {a'}{b}}-a{\frac {b'}{b^{2}}}={\frac {(a'b-ab')}{b^{2}}}\,}$,

which is analogous to the quotient rule for the derivative of a function in analysis.

### Properties

The arithmetic derivative preserves the power rule (for negative prime powers):

${\displaystyle {\bigg (}{\frac {1}{p^{a}}}{\bigg )}'=-{\frac {a}{p^{a+1}}},\,}$

where ${\displaystyle \scriptstyle p\,}$ is prime and ${\displaystyle \scriptstyle a\,\geq \,1.\,}$

## Sequences

The arithmetic derivative of ${\displaystyle \scriptstyle n,\ n\,\geq \,0\,}$, gives the sequence A003415

{0, 0, 1, 1, 4, 1, 5, 1, 12, 6, 7, 1, 16, 1, 9, 8, 32, 1, 21, 1, 24, 10, 13, 1, 44, 10, 15, 27, 32, 1, 31, 1, 80, 14, 19, 12, 60, 1, 21, 16, 68, 1, 41, 1, 48, 39, 25, 1, 112, 14, 45, 20, 56, 1, 81, 16, 92, 22, 31, 1, 92, 1, 33, 51, ...}

## Arithmetic derivative of Gaussian integers

Ufnarovski and Ahlander briefly mention this idea, but they do not pursue it because the derivative of Gaussian integers is not an extension of the arithmetic derivative of integers. Every nonzero Gaussian integer has a unique factorization into the product of a unit (1, -1, i, -i) and powers of positive Gaussian primes (i.e. Gaussian primes ${\displaystyle \scriptstyle a+bi\,}$ where ${\displaystyle \scriptstyle a\,>\,0\,}$ and ${\displaystyle \scriptstyle b\,\geq \,0\,}$).

### Definition

• The arithmetic derivative of all positive (first quadrant) Gaussian primes ${\displaystyle \scriptstyle p\,}$ is defined as 1
${\displaystyle p'\,\equiv \,1;\,}$
• The arithmetic derivative of a product follows the Leibniz rule
${\displaystyle (uv)'\,\equiv \,u'v+uv'.\,}$

### Arithmetic derivative of 0 or a unit (1, -1, i, -i)

The definition leads to the following results

• The arithmetic derivative of 0 or a unit (1, -1, i, -i) is 0;
• The arithmetic derivative of a unit (1, -1, i, -i) times a Gaussian integer is that unit times the arithmetic derivative of that Gaussian integer
${\displaystyle (u)'\,=\,u',\,}$
${\displaystyle (-u)'\,=\,-u',\,}$
${\displaystyle (iu)'\,=\,iu',\,}$
${\displaystyle (-iu)'\,=\,-iu'.\,}$

### Arithmetic derivative of Gaussian primes

A Gaussian prime is a unit (1, -1, i, -i) times a positive Gaussian prime.

The arithmetic derivative of a Gaussian prime (a unit (1, -1, i, -i) times a positive Gaussian prime) is that unit (if and only if rule)

${\displaystyle (p)'\,=\,p'\,=\,1,\,}$
${\displaystyle (-p)'\,=\,-p'\,=\,-1,\,}$
${\displaystyle (ip)'\,=\,ip'\,=i,\,}$
${\displaystyle (-ip)'\,=\,-ip'\,=\,-i.\,}$

### Arithmetic second derivative of Gaussian primes

The arithmetic second derivative of a Gaussian prime is thus zero (if and only if rule)

${\displaystyle (p)''\,=\,p''\,=\,1'\,=\,0,\,}$
${\displaystyle (-p)''\,=\,-p''\,=\,-1'\,=\,0,\,}$
${\displaystyle (ip)''\,=\,ip''\,=i'\,=\,0,\,}$
${\displaystyle (-ip)''\,=\,-ip''\,=\,-i'\,=\,0.\,}$

## Arithmetic derivative of Gaussian rationals

This definition of arithmetic derivative can be extended to fractions ${\displaystyle \scriptstyle u/v\,}$, where ${\displaystyle \scriptstyle u\,}$ and ${\displaystyle \scriptstyle v\,}$ are Gaussian integers.

## Generalizations

The relation ${\displaystyle \scriptstyle (ab)'\,=\,a'b+ab'\,}$ implies ${\displaystyle \scriptstyle 1'\,=\,0\,}$, but it does not imply ${\displaystyle \scriptstyle p'\,=\,1\,}$ for ${\displaystyle \scriptstyle p\,}$ a prime. In fact, any function ${\displaystyle \scriptstyle f\,}$ defined on the primes can be extended uniquely to a function on the integers satisfying this relation (Cf. A003415, comment from: Franklin T. Adams-Watters (FrankTAW(AT)Netscape.net), Nov 07 2006):

${\displaystyle f(n)=f{\bigg (}\prod _{i=1}^{\omega (n)}{p_{i}}^{e_{i}}{\bigg )}={\bigg (}\prod _{i=1}^{\omega (n)}{p_{i}}^{e_{i}}{\bigg )}{\bigg (}\sum _{i=1}^{\omega (n)}{\frac {e_{i}}{p_{i}}}f(p_{i}){\bigg )}=n{\bigg (}\sum _{i=1}^{\omega (n)}{\frac {e_{i}}{p_{i}}}f(p_{i}){\bigg )}.\,}$

## Applications

Emmons, Krebs, & Shaheen suggest several undergraduate projects involving the study of the arithmetic derivative.[1]

• A003415 a(n) = n' = derivative of n: a(0) = a(1) = 0, a(prime) = 1, a(mn) = m*a(n) + n*a(m).
• A086134 Least prime factor of n'.
• A086131 Greatest prime factor of n'.
• A085731 gcd(n, n').
• k-th arithmetic derivative of n
• A003415 a(n) = n' = derivative of n: a(0) = a(1) = 0, a(prime) = 1, a(mn) = m*a(n) + n*a(m).
• A068346 Arithmetic second derivative of n.
• A099306 Arithmetic third derivative of n.
• ...
• A129150 n-th arithmetic derivative of 2^3.
• A129151 n-th arithmetic derivative of 3^4.
• A129152 n-th arithmetic derivative of 5^6.
• A099309 k-th arithmetic derivative of n is nonzero for all k.
• A099308 k-th arithmetic derivative of n is zero for some k.
• A099307 Least k such that the k-th arithmetic derivative of n is zero.
• Arithmetic derivative of polynomials
• A068719 Arithmetic derivative of 2n.
• A068312 Arithmetic derivative of triangular numbers.
• A068720 Arithmetic derivative of n^2.
• A068721 Arithmetic derivative of n^3.
• A068329 Arithmetic derivative of Fibonacci(n).
• Arithmetic derivative of special numbers
• A068328 Arithmetic derivative of squarefree numbers.
• A086300 Arithmetic derivative of 7-smooth numbers.
• 'Arithmetic differential' Diophantine equations
• A051674 n such that n' = n (i.e. (n-th prime)^(n-th prime).)
• A098700 n such that x' = n has no integer solution.
• A098699 Least x such that x' = n.
• A099303 Greatest x such that x' = n.
• A099302 Number of solutions to x' = n.
• A099304 Least such that (n+k)' = n' + k'.
• A099305 Number of solutions to (n+k)' = n' + k'.
• Arithmetic derivative of rational numbers
• A068237 Numerator of arithmetic derivative of 1/n.
• A068238 Denominator of arithmetic derivative of 1/n.
• Arithmetic derivative of Gaussian integers
• A099379 The real part of n', the arithmetic derivative for Gaussian integers.
• A099380 The imaginary part of -n', the arithmetic derivative for Gaussian integers.

## References

1. Caleb Emmons, Mike Krebs, Anthony Shaheen, How to differentiate an integer modulo n, The College Mathematics Journal 40:5, pp. 345-353 (2009).