Trisha Shetty (Editor)

Arithmetic function

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In number theory, an arithmetic, arithmetical, or number-theoretic function is a real or complex valued function f(n) defined on the set of natural numbers (i.e., positive integers) that "expresses some arithmetical property of n".

Contents

An example of an arithmetic function is the divisor function whose value at a positive integer n is equal to the number of divisors of n.

There is a larger class of number-theoretic functions that do not fit the above definition, e.g. the prime-counting functions. This article provides links to functions of both classes.

Notation

p f ( p )   and   p f ( p )   mean that the sum or product is over all prime numbers:

p f ( p ) = f ( 2 ) + f ( 3 ) + f ( 5 ) +     p f ( p ) = f ( 2 ) f ( 3 ) f ( 5 ) .

Similarly,   p k f ( p k )   and   p k f ( p k )   mean that the sum or product is over all prime powers with strictly positive exponent (so 1 is not included):

p k f ( p k ) = f ( 2 ) + f ( 3 ) + f ( 4 ) + f ( 5 ) + f ( 7 ) + f ( 8 ) + f ( 9 ) +

d n f ( d )   and   d n f ( d )   mean that the sum or product is over all positive divisors of n, including 1 and n. E.g., if n = 12,

d 12 f ( d ) = f ( 1 ) f ( 2 ) f ( 3 ) f ( 4 ) f ( 6 ) f ( 12 ) .  

The notations can be combined:   p n f ( p )   and   p n f ( p )   mean that the sum or product is over all prime divisors of n. E.g., if n = 18,

p 18 f ( p ) = f ( 2 ) + f ( 3 ) ,  

and similarly   p k n f ( p k )   and   p k n f ( p k )   mean that the sum or product is over all prime powers dividing n. E.g., if n = 24,

p k 24 f ( p k ) = f ( 2 ) f ( 3 ) f ( 4 ) f ( 8 ) .  

Multiplicative and additive functions

An arithmetic function a is

  • completely additive if a(mn) = a(m) + a(n) for all natural numbers m and n;
  • completely multiplicative if a(mn) = a(m)a(n) for all natural numbers m and n;
  • Two whole numbers m and n are called coprime if their greatest common divisor is 1; i.e., if there is no prime number that divides both of them.

    Then an arithmetic function a is

  • additive if a(mn) = a(m) + a(n) for all coprime natural numbers m and n;
  • multiplicative if a(mn) = a(m)a(n) for all coprime natural numbers m and n.
  • Ω(n), ω(n), νp(n) – prime power decomposition

    The fundamental theorem of arithmetic states that any positive integer n can be represented uniquely as a product of powers of primes:   n = p 1 a 1 p k a k   where p1 < p2 < ... < pk are primes and the aj are positive integers. (1 is given by the empty product.)

    It is often convenient to write this as an infinite product over all the primes, where all but a finite number have a zero exponent. Define νp(n) as the exponent of the highest power of the prime p that divides n. I.e. if p is one of the pi then νp(n) = ai, otherwise it is zero. Then

    n = p p ν p ( n ) .

    In terms of the above the functions ω and Ω are defined by

    ω(n) = k, Ω(n) = a1 + a2 + ... + ak.

    To avoid repetition, whenever possible formulas for the functions listed in this article are given in terms of n and the corresponding pi, ai, ω, and Ω.

    σk(n), τ(n), d(n) – divisor sums

    σk(n) is the sum of the kth powers of the positive divisors of n, including 1 and n, where k is a complex number.

    σ1(n), the sum of the (positive) divisors of n, is usually denoted by σ(n).

    Since a positive number to the zero power is one, σ0(n) is therefore the number of (positive) divisors of n; it is usually denoted by d(n) or τ(n) (for the German Teiler = divisors).

    σ k ( n ) = i = 1 ω ( n ) p i ( a i + 1 ) k 1 p i k 1 = i = 1 ω ( n ) ( 1 + p i k + p i 2 k + + p i a i k ) .

    Setting k = 0 in the second product gives

    τ ( n ) = d ( n ) = ( 1 + a 1 ) ( 1 + a 2 ) ( 1 + a ω ( n ) ) .

    φ(n) – Euler totient function

    φ(n), the Euler totient function, is the number of positive integers not greater than n that are coprime to n.

    φ ( n ) = n p n ( 1 1 p ) = n ( p 1 1 p 1 ) ( p 2 1 p 2 ) ( p ω ( n ) 1 p ω ( n ) ) .

    Jk(n) – Jordan totient function

    Jk(n), the Jordan totient function, is the number of k-tuples of positive integers all less than or equal to n that form a coprime (k + 1)-tuple together with n. It is a generalization of Euler's totient, φ(n) = J1(n).

    J k ( n ) = n k p n ( 1 1 p k ) = n k ( p 1 k 1 p 1 k ) ( p 2 k 1 p 2 k ) ( p ω ( n ) k 1 p ω ( n ) k ) .

    μ(n) – Möbius function

    μ(n), the Möbius function, is important because of the Möbius inversion formula. See Dirichlet convolution, below.

    μ ( n ) = { ( 1 ) ω ( n ) = ( 1 ) Ω ( n ) if  ω ( n ) = Ω ( n ) 0 if  ω ( n ) Ω ( n ) .

    This implies that μ(1) = 1. (Because Ω(1) = ω(1) = 0.)

    τ(n) – Ramanujan tau function

    τ(n), the Ramanujan tau function, is defined by its generating function identity:

    n 1 τ ( n ) q n = q n 1 ( 1 q n ) 24 .

    Although it is hard to say exactly what "arithmetical property of n" it "expresses", (τ(n) is (2π)−12 times the nth Fourier coefficient in the q-expansion of the modular discriminant function) it is included among the arithmetical functions because it is multiplicative and it occurs in identities involving certain σk(n) and rk(n) functions (because these are also coefficients in the expansion of modular forms).

    cq(n) – Ramanujan's sum

    cq(n), Ramanujan's sum, is the sum of the nth powers of the primitive qth roots of unity:

    c q ( n ) = gcd ( a , q ) = 1 1 a q e 2 π i a q n .

    Even though it is defined as a sum of complex numbers (irrational for most values of q), it is an integer. For a fixed value of n it is multiplicative in q:

    If q and r are coprime, c q ( n ) c r ( n ) = c q r ( n ) .

    Many of the functions mentioned in this article have expansions as series involving these sums; see the article Ramanujan's sum for examples.

    λ(n) – Liouville function

    λ(n), the Liouville function, is defined by

    λ ( n ) = ( 1 ) Ω ( n ) .

    χ(n) – characters

    All Dirichlet characters χ(n) are completely multiplicative. An example is the non-principal character (mod 4) defined in the introduction. Two characters have special notations:

    The principal character (mod n) is denoted by χ0(a) (or χ1(a)). It is defined as

    χ 0 ( a ) = { 1 if  gcd ( a , n ) = 1 , 0 if  gcd ( a , n ) 1.

    The quadratic character (mod n) is denoted by the Jacobi symbol for odd n (it is not defined for even n.):

    ( a n ) = ( a p 1 ) a 1 ( a p 2 ) a 2 ( a p ω ( n ) ) a ω ( n ) .


    In this formula ( a p ) is the Legendre symbol, defined for all integers a and all odd primes p by

    ( a p ) = { 0  if  a 0 ( mod p ) + 1  if  a 0 ( mod p )  and for some integer  x , a x 2 ( mod p ) 1  if there is no such  x .

    Following the normal convention for the empty product, ( a 1 ) = 1.

    ω(n) – distinct prime divisors

    ω(n), defined above as the number of distinct primes dividing n, is additive.

    Ω(n) – prime divisors

    Ω(n), defined above as the number of prime factors of n counted with multiplicities, is completely additive.

    νp(n) – p-adic valuation of an integer n

    For a fixed prime p, νp(n), defined above as the exponent of the largest power of p dividing n, is completely additive.

    π(x), Π(x), θ(x), ψ(x) – prime count functions

    These important functions (which are not arithmetic functions) are defined for non-negative real arguments, and are used in the various statements and proofs of the prime number theorem. They are summation functions (see the main section just below) of arithmetic functions which are neither multiplicative nor additive.

    π(x), the prime counting function, is the number of primes not exceeding x. It is the summation function of the characteristic function of the prime numbers.

    π ( x ) = p x 1

    A related function counts prime powers with weight 1 for primes, 1/2 for their squares, 1/3 for cubes, … It is the summation function of the arithmetic function which takes the value 1/k on integers which are the k-th power of some prime number, and the value 0 on other integers.

    Π ( x ) = p k x 1 k .

    θ(x) and ψ(x), the Chebyshev functions, are defined as sums of the natural logarithms of the primes not exceeding x.

    ϑ ( x ) = p x log p , ψ ( x ) = p k x log p .

    The Chebyshev function ψ(x) is the summation function of the von Mangoldt function just below.

    Λ(n) – von Mangoldt function

    Λ(n), the von Mangoldt function, is 0 unless the argument is a prime power, in which case it is the natural log of the prime:

    Λ ( n ) = { log p if  n = 2 , 3 , 4 , 5 , 7 , 8 , 9 , 11 , 13 , 16 , = p k  is a prime power 0 if  n = 1 , 6 , 10 , 12 , 14 , 15 , 18 , 20 , 21 ,  is not a prime power .

    p(n) – partition function

    p(n), the partition function, is the number of ways of representing n as a sum of positive integers, where two representations with the same summands in a different order are not counted as being different:

    p ( n ) = | { ( a 1 , a 2 , a k ) : 0 < a 1 a 2 a k n = a 1 + a 2 + + a k } | .

    λ(n) – Carmichael function

    λ(n), the Carmichael function, is the smallest positive number such that a λ ( n ) 1 ( mod n )   for all a coprime to n. Equivalently, it is the least common multiple of the orders of the elements of the multiplicative group of integers modulo n.

    For powers of odd primes and for 2 and 4, λ(n) is equal to the Euler totient function of n; for powers of 2 greater than 4 it is equal to one half of the Euler totient function of n:

    λ ( n ) = { ϕ ( n ) if  n = 2 , 3 , 4 , 5 , 7 , 9 , 11 , 13 , 17 , 19 , 23 , 25 , 27 , 1 2 ϕ ( n ) if  n = 8 , 16 , 32 , 64 ,

    and for general n it is the least common multiple of λ of each of the prime power factors of n:

    λ ( p 1 a 1 p 2 a 2 p ω ( n ) a ω ( n ) ) = lcm [ λ ( p 1 a 1 ) , λ ( p 2 a 2 ) , , λ ( p ω ( n ) a ω ( n ) ) ] .

    h(n) – Class number

    h(n), the class number function, is the order of the ideal class group of an algebraic extension of the rationals with discriminant n. The notation is ambiguous, as there are in general many extensions with the same discriminant. See quadratic field and cyclotomic field for classical examples.

    rk(n) – Sum of k squares

    rk(n) is the number of ways n can be represented as the sum of k squares, where representations that differ only in the order of the summands or in the signs of the square roots are counted as different.

    r k ( n ) = | { ( a 1 , a 2 , , a k ) : n = a 1 2 + a 2 2 + + a k 2 } |

    Summation functions

    Given an arithmetic function a(n), its summation function A(x) is defined by

    A ( x ) := n x a ( n ) .

    A can be regarded as a function of a real variable. Given a positive integer m, A is constant along open intervals m < x < m + 1, and has a jump discontinuity at each integer for which a(m) ≠ 0.

    Since such functions are often represented by series and integrals, to achieve pointwise convergence it is usual to define the value at the discontinuities as the average of the values to the left and right:

    A 0 ( m ) := 1 2 ( n < m a ( n ) + n m a ( n ) ) = A ( m ) 1 2 a ( m ) .

    Individual values of arithmetic functions may fluctuate wildly – as in most of the above examples. Summation functions "smooth out" these fluctuations. In some cases it may be possible to find asymptotic behaviour for the summation function for large x.

    A classical example of this phenomenon is given by the divisor summatory function, the summation function of d(n), the number of divisors of n:

    lim inf n d ( n ) = 2 lim sup n log d ( n ) log log n log n = log 2 lim n d ( 1 ) + d ( 2 ) + + d ( n ) log ( 1 ) + log ( 2 ) + + log ( n ) = 1.

    An average order of an arithmetic function is some simpler or better-understood function which has the same summation function asymptotically, and hence takes the same values "on average". We say that g is an average order of f if

    n x f ( n ) n x g ( n )

    as x tends to infinity. The example above shows that d(n) has the average order log(n).

    Dirichlet convolution

    Given an arithmetic function a(n), let Fa(s), for complex s, be the function defined by the corresponding Dirichlet series (where it converges):

    F a ( s ) := n = 1 a ( n ) n s .

    Fa(s) is called a generating function of a(n). The simplest such series, corresponding to the constant function a(n) = 1 for all n, is ς(s) the Riemann zeta function.

    The generating function of the Möbius function is the inverse of the zeta function:

    ζ ( s ) n = 1 μ ( n ) n s = 1 , R s > 0.

    Consider two arithmetic functions a and b and their respective generating functions Fa(s) and Fb(s). The product Fa(s)Fb(s) can be computed as follows:

    F a ( s ) F b ( s ) = ( m = 1 a ( m ) m s ) ( n = 1 b ( n ) n s ) .

    It is a straightforward exercise to show that if c(n) is defined by

    c ( n ) := i j = n a ( i ) b ( j ) = i n a ( i ) b ( n i ) ,

    then

    F c ( s ) = F a ( s ) F b ( s ) .

    This function c is called the Dirichlet convolution of a and b, and is denoted by a b .

    A particularly important case is convolution with the constant function a(n) = 1 for all n, corresponding to multiplying the generating function by the zeta function:

    g ( n ) = d n f ( d ) .

    Multiplying by the inverse of the zeta function gives the Möbius inversion formula:

    f ( n ) = d n μ ( n d ) g ( d ) .

    If f is multiplicative, then so is g. If f is completely multiplicative, then g is multiplicative, but may or may not be completely multiplicative.

    Relations among the functions

    There are a great many formulas connecting arithmetical functions with each other and with the functions of analysis, especially powers, roots, and the exponential and log functions.

    Here are a few examples:

    Dirichlet convolutions

    δ n μ ( δ ) = δ n λ ( n δ ) | μ ( δ ) | = { 1  if  n = 1 0  if  n 1.     where λ is the Liouville function.     δ n φ ( δ ) = n .       d n J k ( d ) = n k .       δ n δ s J r ( δ ) J s ( n δ ) = J r + s ( n )       δ n φ ( δ ) d ( n δ ) = σ ( n ) .       δ n | μ ( δ ) | = 2 ω ( n ) .       δ n 2 ω ( δ ) = d ( n 2 ) .       δ n d ( δ 2 ) = d 2 ( n ) .       δ n d ( n δ ) 2 ω ( δ ) = d 2 ( n ) .       δ n λ ( δ ) = { 1  if  n  is a square  0  if  n  is not square.     where λ is the Liouville function. δ n Λ ( δ ) = log n .      

    Sums of squares

    If  k 4 , r k ( n ) > 0.     (Lagrange's four-square theorem). r 2 ( n ) = 4 d n χ ( d ) ,     where χ is the non-principal character (mod 4) defined in the introduction.

    There is a formula for r3 in the section on class numbers below.

    r 4 ( n ) = 8 4 d d n d = 8 ( 2 + ( 1 ) n ) 2 d d n d = { 8 σ ( n ) if  n  is odd  24 σ ( n 2 ν ) if  n  is even  ,     where ν = ν2(n).     r 6 ( n ) = 16 d n χ ( n d ) d 2 4 d n χ ( d ) d 2 .    

    Define the function σk*(n) as

    σ k ( n ) = ( 1 ) n d n ( 1 ) d d k = { d n d k = σ k ( n ) if  n  is odd  2 d d n d k 2 d d n d k if  n  is even .

    That is, if n is odd, σk*(n) is the sum of the kth powers of the divisors of n, i.e. σk(n), and if n is even it is the sum of the kth powers of the even divisors of n minus the sum of the kth powers of the odd divisors of n.

    r 8 ( n ) = 16 σ 3 ( n ) .    

    Adopt the convention that Ramanujan's τ(x) = 0 if x is not an integer.

    r 24 ( n ) = 16 691 σ 11 ( n ) + 128 691 { ( 1 ) n 1 259 τ ( n ) 512 τ ( n 2 ) }    

    Divisor sum convolutions

    Here "convolution" does not mean "Dirichlet convolution" but instead refers to the formula for the coefficients of the product of two power series:

    ( n = 0 a n x n ) ( n = 0 b n x n ) = i = 0 j = 0 a i b j x i + j = n = 0 ( i = 0 n a i b n i ) x n = n = 0 c n x n .

    The sequence c n = i = 0 n a i b n i is called the convolution or the Cauchy product of the sequences an and bn.
    See Eisenstein series for a discussion of the series and functional identities involved in these formulas.

    σ 3 ( n ) = 1 5 { 6 n σ 1 ( n ) σ 1 ( n ) + 12 0 < k < n σ 1 ( k ) σ 1 ( n k ) } .     σ 5 ( n ) = 1 21 { 10 ( 3 n 1 ) σ 3 ( n ) + σ 1 ( n ) + 240 0 < k < n σ 1 ( k ) σ 3 ( n k ) } .     σ 7 ( n ) = 1 20 { 21 ( 2 n 1 ) σ 5 ( n ) σ 1 ( n ) + 504 0 < k < n σ 1 ( k ) σ 5 ( n k ) } = σ 3 ( n ) + 120 0 < k < n σ 3 ( k ) σ 3 ( n k ) .     σ 9 ( n ) = 1 11 { 10 ( 3 n 2 ) σ 7 ( n ) + σ 1 ( n ) + 480 0 < k < n σ 1 ( k ) σ 7 ( n k ) } = 1 11 { 21 σ 5 ( n ) 10 σ 3 ( n ) + 5040 0 < k < n σ 3 ( k ) σ 5 ( n k ) } .     τ ( n ) = 65 756 σ 11 ( n ) + 691 756 σ 5 ( n ) 691 3 0 < k < n σ 5 ( k ) σ 5 ( n k ) ,     where τ(n) is Ramanujan's function.    

    Since σk(n) (for natural number k) and τ(n) are integers, the above formulas can be used to prove congruences for the functions. See Tau-function for some examples.

    Extend the domain of the partition function by setting p(0) = 1.

    p ( n ) = 1 n 1 k n σ ( k ) p ( n k ) .       This recurrence can be used to compute p(n).

    Peter Gustav Lejeune Dirichlet discovered formulas that relate the class number h of quadratic number fields to the Jacobi symbol.

    An integer D is called a fundamental discriminant if it is the discriminant of a quadratic number field. This is equivalent to D ≠ 1 and either a) D is squarefree and D ≡ 1 (mod 4) or b) D ≡ 0 (mod 4), D/4 is squarefree, and D/4 ≡ 2 or 3 (mod 4).

    Extend the Jacobi symbol to accept even numbers in the "denominator" by defining the Kronecker symbol:

    ( a 2 ) = { 0  if  a  is even ( 1 ) a 2 1 8  if  a  is odd. 

    Then if D < −4 is a fundamental discriminant

    h ( D ) = 1 D r = 1 | D | r ( D r ) = 1 2 ( D 2 ) r = 1 | D | / 2 ( D r ) .

    There is also a formula relating r3 and h. Again, let D be a fundamental discriminant, D < −4. Then

    r 3 ( | D | ) = 12 ( 1 ( D 2 ) ) h ( D ) .

    Let H n = 1 + 1 2 + 1 3 + + 1 n   be the nth harmonic number.   Then

    σ ( n ) H n + e H n log H n   is true for every natural number n if and only if the Riemann hypothesis is true.    

    The Riemann hypothesis is also equivalent to the statement that, for all n > 5040,

    σ ( n ) < e γ n log log n     (where γ is the Euler–Mascheroni constant).     This is Robin's theorem. p ν p ( n ) = Ω ( n ) . ψ ( x ) = n x Λ ( n ) .     Π ( x ) = n x Λ ( n ) log n .     e θ ( x ) = p x p .     e ψ ( x ) = lcm [ 1 , 2 , , x ] .    

    Menon's identity

    In 1965 P. Kesava Menon proved

    gcd ( k , n ) = 1 1 k n gcd ( k 1 , n ) = φ ( n ) d ( n ) .

    This has been generalized by a number of mathematicians, e.g.:

    B. Sury

    gcd ( k 1 , n ) = 1 1 k 1 , k 2 , , k s n gcd ( k 1 1 , k 2 , , k s , n ) = φ ( n ) σ s 1 ( n ) .

    N. Rao

    gcd ( k 1 , k 2 , , k s , n ) = 1 1 k 1 , k 2 , , k s n gcd ( k 1 a 1 , k 2 a 2 , , k s a s , n ) s = J s ( n ) d ( n ) ,

    where a1, a2, ..., as are integers, gcd(a1, a2, ..., as, n) = 1.

    L. Tóth

    gcd ( k , m ) = 1 1 k m gcd ( k 2 1 , m 1 ) gcd ( k 2 1 , m 2 ) = φ ( n ) d 2 m 2 d 1 m 1 φ ( gcd ( d 1 , d 2 ) ) 2 ω ( lcm ( d 1 , d 2 ) ) ,

    where m1 and m2 are odd, m = lcm(m1, m2).

    In fact, if f is any arithmetical function

    gcd ( k , n ) = 1 1 k n f ( gcd ( k 1 , n ) ) = φ ( n ) d n ( μ f ) ( d ) φ ( d ) ,

    where * stands for Dirichlet convolution.

    Miscellaneous

    Let m and n be distinct, odd, and positive. Then the Jacobi symbol satisfies the law of quadratic reciprocity:

    ( m n ) ( n m ) = ( 1 ) ( m 1 ) ( n 1 ) / 4 .    

    Let λ(n) be Liouville's function. Then

    | λ ( n ) | μ ( n ) = λ ( n ) | μ ( n ) | = μ ( n ) ,     and λ ( n ) μ ( n ) = | μ ( n ) | = μ 2 ( n ) .    

    Let λ(n) be Carmichael's function. Then

    λ ( n ) ϕ ( n ) .     Further, λ ( n ) = ϕ ( n )  if and only if  n = { 1 , 2 , 4 ; 3 , 5 , 7 , 9 , 11 ,  i.e.  p k  where  p  is an odd prime ; 6 , 10 , 14 , 18 ,  i.e.  2 p k  where  p  is an odd prime .       2 ω ( n ) d ( n ) 2 Ω ( n ) .     6 π 2 < ϕ ( n ) σ ( n ) n 2 < 1.     c q ( n ) = μ ( q gcd ( q , n ) ) ϕ ( q gcd ( q , n ) ) ϕ ( q ) = δ gcd ( q , n ) μ ( q δ ) δ .         Note that   ϕ ( q ) = δ q μ ( q δ ) δ .     c q ( 1 ) = μ ( q ) . c q ( q ) = ϕ ( q ) . δ n d 3 ( δ ) = ( δ n d ( δ ) ) 2 .       Compare this with 13 + 23 + 33 + ... + n3 = (1 + 2 + 3 + ... + n)2 d ( u v ) = δ gcd ( u , v ) μ ( δ ) d ( u δ ) d ( v δ ) .     σ k ( u ) σ k ( v ) = δ gcd ( u , v ) δ k σ k ( u v δ 2 ) .     τ ( u ) τ ( v ) = δ gcd ( u , v ) δ 11 τ ( u v δ 2 ) ,     where τ(n) is Ramanujan's function.    

    References

    Arithmetic function Wikipedia