Arithmetic function: Difference between revisions

Content deleted Content added
Tags: Mobile edit Mobile web edit Advanced mobile edit
rm some :-indents. the rest need to be converted to appropriate lists
Line 22:
 
==Notation==
<math display="inline">\sum_p f(p)</math> &nbsp; and &nbsp; <math display="inline">\prod_p f(p)</math> &nbsp; mean that the sum or product is over all [[prime number]]s:
<math display="block">\sum_p f(p) = f(2) + f(3) + f(5) + \cdots</math>
<math display="block">\prod_p f(p)= f(2)f(3)f(5)\cdots.</math>
 
Similarly, <math display="inline">\sum_{p^k} f(p^k)</math> and <math display="inline">\prod_{p^k} f(p^k)</math> mean that the sum or product is over all [[prime power]]s with strictly positive exponent (so {{math|1=''k'' = 0}} is not included):
:<math>\sum_p f(p) = f(2) + f(3) + f(5) + \cdots</math>
:<math display="block">\prod_psum_{p^k} f(p^k) = \sum_p\sum_{k > 0} f(p^k) = f(2) + f(3) + f(4) +f(5) +f(7)+f(8)+f(9)+\cdots.</math>
 
Similarly, &nbsp; <math display="inline">\sum_{p^kd\mid n} f(p^kd)</math> &nbsp; and &nbsp; <math display="inline">\prod_{p^kd\mid n} f(p^kd)</math> &nbsp; mean that the sum or product is over all [[primepositive power]]sdivisors withof strictly''n'', positiveincluding exponent1 (soand ''kn''. =For 0example, isif not{{math|1=''n'' included):= 12}},
<math display="block">\prod_{d\mid 12} f(d) = f(1)f(2) f(3) f(4) f(6) f(12). </math>
 
The notations can be combined: <math display="inline">\sum_{p\mid n} f(p)</math> and <math display="inline">\prod_{p\mid n} f(p)</math> mean that the sum or product is over all prime divisors of ''n''. For example, if ''n'' = 18,
:<math>\sum_{p^k} f(p^k) = \sum_p\sum_{k > 0} f(p^k) = f(2) + f(3) + f(4) +f(5) +f(7)+f(8)+f(9)+\cdots</math>
<math display="block">\sum_{p\mid 18} f(p) = f(2) + f(3), </math>
 
and similarly <math display="inline">\sum_{dp^k\mid n} f(dp^k)</math> &nbsp; and &nbsp; <math display="inline">\prod_{dp^k\mid n} f(dp^k)</math> &nbsp; mean that the sum or product is over all positiveprime divisorspowers of ''n'', including 1 anddividing ''n''. For example, if ''n'' = 1224,
<math display="block">\prod_{p^k\mid 24} f(p^k) = f(2) f(3) f(4) f(8). </math>
 
:<math>\prod_{d\mid 12} f(d) = f(1)f(2) f(3) f(4) f(6) f(12).\ </math>
 
The notations can be combined: &nbsp; <math display="inline">\sum_{p\mid n} f(p)</math> &nbsp; and &nbsp; <math display="inline">\prod_{p\mid n} f(p)</math> &nbsp; mean that the sum or product is over all prime divisors of ''n''. For example, if ''n'' = 18,
 
:<math>\sum_{p\mid 18} f(p) = f(2) + f(3),\ </math>
 
and similarly &nbsp; <math display="inline">\sum_{p^k\mid n} f(p^k)</math> &nbsp; and &nbsp; <math display="inline">\prod_{p^k\mid n} f(p^k)</math> &nbsp; mean that the sum or product is over all prime powers dividing ''n''. For example, if ''n'' = 24,
 
:<math>\prod_{p^k\mid 24} f(p^k) = f(2) f(3) f(4) f(8). </math>
 
==Ω(''n''), ''ω''(''n''), ''ν''<sub>''p''</sub>(''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: &nbsp; <math> n = p_1^{a_1}\cdots p_k^{a_k} </math> &nbsp; where ''p''<sub>1</sub> < ''p''<sub>2</sub> < ... < ''p''<sub>''k''</sub> are primes and the ''a<sub>j</sub>'' 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 the [[p-adic valuation|''p''-adic valuation]] '''ν<sub>''p''</sub>(''n'')''' to be the exponent of the highest power of the prime ''p'' that divides ''n''. That is, if ''p'' is one of the ''p''<sub>''i''</sub> then ''ν''<sub>''p''</sub>(''n'') = ''a''<sub>''i''</sub>, otherwise it is zero. Then
<math display="block">n = \prod_p p^{\nu_p(n)}.</math>
 
:<Math>n=\prod_p p^{\nu_p(n)}.</math>
 
In terms of the above the [[prime omega function]]s ω and Ω are defined by
{{block indent | em = 1.5 | text = ''ω''(''n'') = ''k'',}}
 
{{block indent | em = 1.5 | text = Ω(''n'') = ''a''<sub>1</sub> + ''a''<sub>2</sub> + ... + ''a''<sub>''k''</sub>.}}
:''ω''(''n'') = ''k'',
:Ω(''n'') = ''a''<sub>1</sub> + ''a''<sub>2</sub> + ... + ''a''<sub>''k''</sub>.
 
To avoid repetition, whenever possible formulas for the functions listed in this article are given in terms of ''n'' and the corresponding ''p''<sub>''i''</sub>, ''a''<sub>''i''</sub>, ω, and Ω.
Line 65 ⟶ 57:
Since a positive number to the zero power is one, '''σ<sub>0</sub>(''n'')''' is therefore the number of (positive) divisors of ''n''; it is usually denoted by '''''d''(''n'')''' or '''τ(''n'')''' (for the German ''Teiler'' = divisors).
 
:<math display="block">\sigma_k(n) = \prod_{i=1}^{\omega(n)} \frac{p_i^{(a_i+1)k}-1}{p_i^k-1}= \prod_{i=1}^{\omega(n)} \left(1 + p_i^k + p_i^{2k} + \cdots + p_i^{a_i k}\right).</math>
= \prod_{i=1}^{\omega(n)} \left(1 + p_i^k + p_i^{2k} + \cdots + p_i^{a_i k}\right).
</math>
 
Setting ''k'' = 0 in the second product gives
<math display="block">\tau(n) = d(n) = (1 + a_{1})(1+a_{2})\cdots(1+a_{\omega(n)}).</math>
 
:<math>\tau(n) = d(n) = (1 + a_{1})(1+a_{2})\cdots(1+a_{\omega(n)}).</math>
 
===φ(''n'') – Euler totient function===
'''[[Euler totient function|φ(''n'')]]''', the Euler totient function, is the number of positive integers not greater than ''n'' that are coprime to ''n''.
 
:<math display="block">\varphi(n) = n \prod_{p\mid n} \left(1-\frac{1}{p}\right)
= n \left(\frac{p_1 - 1}{p_1}\right)\left(\frac{p_2 - 1}{p_2}\right) \cdots \left(\frac{p_{\omega(n)} - 1}{p_{\omega(n)}}\right)
.</math>
 
===J<sub>''k''</sub>(''n'') – Jordan totient function===
'''[[Jordan totient function|J<sub>''k''</sub>(''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, {{nowrapmath|1=φ(''n'') {{=}} J<sub>1</sub>(''n'')}}.
:<math display="block">J_k(n) = n^k \prod_{p\mid n} \left(1-\frac{1}{p^k}\right)
= n^k \left(\frac{p^k_1 - 1}{p^k_1}\right)\left(\frac{p^k_2 - 1}{p^k_2}\right) \cdots \left(\frac{p^k_{\omega(n)} - 1}{p^k_{\omega(n)}}\right)
.</math>
 
Line 89 ⟶ 78:
'''[[Möbius function|μ(''n'')]]''', the Möbius function, is important because of the [[Möbius inversion]] formula. See [[#Dirichlet convolution|Dirichlet convolution]], below.
 
:<math display="block">\mu(n)=\begin{cases}
(-1)^{\omega(n)}=(-1)^{\Omega(n)} &\text{if }\; \omega(n) = \Omega(n)\\
0&\text{if }\;\omega(n) \ne \Omega(n).
\end{cases}</math>
 
This implies that μ(1) = 1. (Because Ω(1) = ω(1) = 0.)
Line 97 ⟶ 88:
'''[[Ramanujan tau function|τ(''n'')]]''', the Ramanujan tau function, is defined by its [[generating function]] identity:
 
:<math display="block">\sum_{n\geq 1}\tau(n)q^n=q\prod_{n\geq 1}(1-q^n)^{24}.</math>
 
Although it is hard to say exactly what "arithmetical property of ''n''" it "expresses",<ref>Hardy, ''Ramanujan'', § 10.2</ref> (''τ''(''n'') is (2π)<sup>−12</sup> times the ''n''th Fourier coefficient in the [[q-expansion]] of the [[Modular discriminant#Modular discriminant|modular discriminant]] function)<ref>Apostol, ''Modular Functions ...'', § 1.15, Ch. 4, and ch. 6</ref> it is included among the arithmetical functions because it is multiplicative and it occurs in identities involving certain σ<sub>''k''</sub>(''n'') and ''r''<sub>''k''</sub>(''n'') functions (because these are also coefficients in the expansion of [[modular form]]s).
Line 103 ⟶ 94:
===''c''<sub>''q''</sub>(''n'') – Ramanujan's sum===
'''[[Ramanujan's sum|''c''<sub>''q''</sub>(''n'')]]''', Ramanujan's sum, is the sum of the ''n''th powers of the primitive ''q''th [[roots of unity]]:
<math display="block">c_q(n) = \sum_{\stackrel{1\le a\le q}{ \gcd(a,q)=1}} e^{2 \pi i \tfrac{a}{q} n}.</math>
 
:<math>c_q(n)=
\sum_{\stackrel{1\le a\le q}{ \gcd(a,q)=1}}
e^{2 \pi i \tfrac{a}{q} n}
.
</math>
 
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''', then <math>c_q(n)c_r(n)=c_{qr}(n).</math>
 
:'''If ''q'' and ''r'' are coprime''', then <math>c_q(n)c_r(n)=c_{qr}(n).
</math>
 
===''ψ''(''n'') - Dedekind psi function===
The [[Dedekind psi function]], used in the theory of [[modular function]]s, is defined by the formula
<math display="block"> \psi(n) = n \prod_{p|n}\left(1+\frac{1}{p}\right).</math>
 
:<math> \psi(n) = n \prod_{p|n}\left(1+\frac{1}{p}\right).</math>
 
==Completely multiplicative functions==
===λ(''n'') – Liouville function===
'''[[Liouville function|''λ''(''n'')]]''', the Liouville function, is defined by
<math display="block">\lambda (n) = (-1)^{\Omega(n)}.</math>
 
:<math>\lambda (n) = (-1)^{\Omega(n)}.</math>
 
===''χ''(''n'') – characters===
Line 130 ⟶ 112:
 
The '''principal character (mod ''n'')''' is denoted by ''χ''<sub>0</sub>(''a'') (or ''χ''<sub>1</sub>(''a'')). It is defined as
<math display="block"> \chi_0(a) = \begin{cases}
 
:<math> \chi_0(a) = \begin{cases} 1 & \text{if } \gcd(a,n) = 1, \\
0 & \text{if } \gcd(a,n) \ne 1.
\end{cases} </math>
 
The '''quadratic character (mod ''n'')''' is denoted by the [[Jacobi symbol]] for odd ''n'' (it is not defined for even ''n''.):
<math display="block">\left(\frac{a}{n}\right) = \left(\frac{a}{p_1}\right)^{a_1}\left(\frac{a}{p_2}\right)^{a_2}\cdots \left(\frac{a}{p_{\omega(n)}}\right)^{a_{\omega(n)}}.</math>
 
:<math>\Bigg(\frac{a}{n}\Bigg) = \left(\frac{a}{p_1}\right)^{a_1}\left(\frac{a}{p_2}\right)^{a_2}\cdots \left(\frac{a}{p_{\omega(n)}}\right)^{a_{\omega(n)}}.</math>
 
In this formula <math>(\tfrac{a}{p})</math> is the [[Legendre symbol]], defined for all integers ''a'' and all odd primes ''p'' by
<math display="block">
 
:<math>
\left(\frac{a}{p}\right) = \begin{cases}
\;\;\,0 & \text{if } a \equiv 0 \pmod p,
Line 165 ⟶ 146:
 
'''[[prime-counting function|{{pi}}(''x'')]]''', the prime-counting function, is the number of primes not exceeding ''x''. It is the summation function of the [[indicator function|characteristic function]] of the prime numbers.
<math display="block">\pi(x) = \sum_{p \le x} 1</math>
 
:<math>\pi(x) = \sum_{p\le x}1
</math>
 
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.
 
:<math display="block">\Pi(x) = \sum_{p^k\le x}\frac{1}{k}.</math>
</math>
 
'''[[Chebyshev function|''θ''(''x'')]]''' and '''''ψ''(''x'')''', the Chebyshev functions, are defined as sums of the natural logarithms of the primes not exceeding ''x''.
<math display="block">\vartheta(x)=\sum_{p\le x} \log p,</math>
are defined as sums of the natural logarithms of the primes not exceeding ''x''.
<math display="block"> \psi(x) = \sum_{p^k\le x} \log p.</math>
 
:<math>\vartheta(x)=\sum_{p\le x} \log p,</math>
 
:<math> \psi(x) = \sum_{p^k\le x} \log p.</math>
 
The Chebyshev function ''ψ''(''x'') is the summation function of the von Mangoldt function just below.
Line 185 ⟶ 160:
===Λ(''n'') – von Mangoldt function===
'''[[von Mangoldt function|Λ(''n'')]]''', the von Mangoldt function, is 0 unless the argument ''n'' is a prime power {{math|''p''<sup>''k''</sup>}}, in which case it is the natural log of the prime ''p'':
<math display="block">\Lambda(n) = \begin{cases}
 
:<math>\Lambda(n) = \begin{cases}\log p &\text{if } n = 2,3,4,5,7,8,9,11,13,16,\ldots=p^k \text{ is a prime power}\\
0&\text{if } n=1,6,10,12,14,15,18,20,21,\dots \;\;\;\;\text{ is not a prime power}.
\end{cases}</math>
</math>
 
===''p''(''n'') – partition function===
'''[[partition function (number theory)|''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:
<math display="block">p(n) = \left|\left\{ (a_1, a_2,\dots a_k): 0 < a_1 \le a_2 \le \cdots \le a_k\; \land \;n=a_1+a_2+\cdots +a_k \right\}\right|.</math>
 
:<math>
p(n) = |\left\{ (a_1, a_2,\dots a_k): 0 < a_1 \le a_2 \le \cdots \le a_k\; \land \;n=a_1+a_2+\cdots +a_k \right\}|.
</math>
 
===λ(''n'') – Carmichael function===
Line 202 ⟶ 173:
 
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'':
<math display="block">\lambda(n) = \begin{cases}
 
:<math>\lambda(n) =
\begin{cases}
\;\;\phi(n) &\text{if }n = 2,3,4,5,7,9,11,13,17,19,23,25,27,\dots\\
\tfrac12tfrac 1 2 \phi(n)&\text{if }n=8,16,32,64,\dots
\end{cases}</math>
</math>
 
and for general ''n'' it is the least common multiple of λ of each of the prime power factors of ''n'':
<math display="block">\lambda(p_1^{a_1}p_2^{a_2} \dots p_{\omega(n)}^{a_{\omega(n)}}) = \operatorname{lcm}[\lambda(p_1^{a_1}),\;\lambda(p_2^{a_2}),\dots,\lambda(p_{\omega(n)}^{a_{\omega(n)}}) ].</math>
 
:<math>\lambda(p_1^{a_1}p_2^{a_2} \dots p_{\omega(n)}^{a_{\omega(n)}}) = \operatorname{lcm}[\lambda(p_1^{a_1}),\;\lambda(p_2^{a_2}),\dots,\lambda(p_{\omega(n)}^{a_{\omega(n)}}) ].
 
</math>
 
===''h''(''n'') – Class number===
Line 222 ⟶ 186:
'''[[Sum of squares function|''r''<sub>''k''</sub>(''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.
 
:<math display="block">r_k(n) = \left|\left\{(a_1, a_2,\dots,a_k):n=a_1^2+a_2^2+\cdots+a_k^2\right\}\right|</math>
</math>
 
===''D''(''n'') – Arithmetic derivative===
Using the [[Differential operator#Notations|Heaviside notation]] for the derivative, '''[[Arithmetic derivative|''D''(''n'')]]''' is a function such that
:* <math> D(n) = 1</math> if ''n'' prime, and
:* <math>D(mn) = m D(n) + D(m) n</math> ([[Product rule]])
 
==Summation functions==
Given an arithmetic function ''a''(''n''), its '''summation function''' ''A''(''x'') is defined by
:<math display="block"> A(x) := \sum_{n \le x} a(n) .</math>
''A'' can be regarded as a function of a real variable. Given a positive integer ''m'', ''A'' is constant along [[open interval]]s ''m'' < ''x'' < ''m'' + 1, and has a [[Classification of discontinuities|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:
<math display="block"> A_0(m) := \frac 1 2 \left(\sum_{n < m} a(n) +\sum_{n \le m} a(n)\right) = A(m) - \frac 1 2 a(m) .</math>
 
:<math> A_0(m) := \frac12\left(\sum_{n < m} a(n) +\sum_{n \le m} a(n)\right) = A(m) - \frac12 a(m) .</math>
 
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 analysis|asymptotic behaviour]] for the summation function for large ''x''.
 
A classical example of this phenomenon<ref>Hardy & Wright, §§ 18.1–18.2</ref> is given by the [[divisor summatory function]], the summation function of ''d''(''n''), the number of divisors of ''n'':
<math display="block">\liminf_{n\to\infty} d(n) = 2</math>
 
:<math display="block">\liminf_limsup_{n\to\infty}\frac{\log d(n) \log\log n}{\log n} = \log 2</math>
<math display="block">\lim_{n\to\infty}\frac{d(1) + d(2)+ \cdots +d(n)}{\log(1) + \log(2)+ \cdots +\log(n)} = 1.</math>
</math>
 
:<math>\limsup_{n\to\infty}\frac{\log d(n) \log\log n}{\log n} = \log 2
</math>
 
:<math>\lim_{n\to\infty}\frac{d(1) + d(2)+ \cdots +d(n)}{\log(1) + \log(2)+ \cdots +\log(n)} = 1.
</math>
 
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
<math display="block"> \sum_{n \le x} f(n) \sim \sum_{n \le x} g(n) </math>
 
:<math> \sum_{n \le x} f(n) \sim \sum_{n \le x} g(n) </math>
 
as ''x'' tends to infinity. The example above shows that ''d''(''n'') has the average order log(''n'').<ref>{{cite book | title=Introduction to Analytic and Probabilistic Number Theory | author=Gérald Tenenbaum | series=Cambridge studies in advanced mathematics | volume=46 | publisher=[[Cambridge University Press]] | pages=36–55 | year=1995 | isbn=0-521-41261-7 }}</ref>
Line 260 ⟶ 215:
==Dirichlet convolution==
Given an arithmetic function ''a''(''n''), let ''F''<sub>''a''</sub>(''s''), for complex ''s'', be the function defined by the corresponding [[Dirichlet series]] (where it [[Convergent series|converges]]):<ref>Hardy & Wright, § 17.6, show how the theory of generating functions can be constructed in a purely formal manner with no attention paid to convergence.</ref>
:<math display="block"> F_a(s) := \sum_{n=1}^\infty \frac{a(n)}{n^s} .</math>
''F''<sub>''a''</sub>(''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:
<math display="block">\zeta(s)\,\sum_{n=1}^\infty\frac{\mu(n)}{n^s}=1, \;\;\Re s >0.</math>
 
:<math>
\zeta(s)\,\sum_{n=1}^\infty\frac{\mu(n)}{n^s}=1, \;\;\mathfrak{R} \,s >0.
</math>
 
Consider two arithmetic functions ''a'' and ''b'' and their respective generating functions ''F''<sub>''a''</sub>(''s'') and ''F''<sub>''b''</sub>(''s''). The product ''F''<sub>''a''</sub>(''s'')''F''<sub>''b''</sub>(''s'') can be computed as follows:
:<math display="block"> F_a(s)F_b(s) = \left( \sum_{m=1}^{\infty}\frac{a(m)}{m^s} \right)\left( \sum_{n=1}^{\infty}\frac{b(n)}{n^s} \right) . </math>
 
It is a straightforward exercise to show that if ''c''(''n'') is defined by
<math display="block"> c(n) := \sum_{ij = n} a(i)b(j) = \sum_{i\mid n}a(i)b\left(\frac{n}{i}\right) , </math>
 
then <math display="block">F_c(s) = F_a(s) F_b(s).</math>
:<math> c(n) := \sum_{ij = n} a(i)b(j) = \sum_{i\mid n}a(i)b\left(\frac{n}{i}\right) , </math>
 
then
 
:<math>F_c(s) =F_a(s) F_b(s).
</math>
 
This function ''c'' is called the [[Dirichlet convolution]] of ''a'' and ''b'', and is denoted by <math>a*b</math>.
 
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:
<math display="block">g(n) = \sum_{d \mid n}f(d).</math>
 
:<math>
g(n) = \sum_{d\mid n}f(d).
</math>
 
Multiplying by the inverse of the zeta function gives the [[Möbius inversion]] formula:
<math display="block">f(n) = \sum_{d\mid n}\mu\left(\frac{n}{d}\right)g(d).</math>
 
:<math>
f(n) = \sum_{d\mid n}\mu\left(\frac{n}{d}\right)g(d).
</math>
 
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.
Line 312 ⟶ 253:
</math> &nbsp; &nbsp; where ''λ'' is the Liouville function.<ref>Hardy & Wright, Thm. 263</ref>
 
:<math>\sum_{\delta\mid n}\varphi(\delta) = n.</math> &nbsp; &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 63</ref>
:<math>
\sum_{\delta\mid n}\varphi(\delta) = n.
</math> &nbsp; &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 63</ref>
 
::<math>\varphi(n)
=\sum_{\delta\mid n}\mu\left(\frac{n}{\delta}\right)\delta
=n\sum_{\delta\mid n}\frac{\mu(\delta)}{\delta}.
</math> &nbsp; &nbsp; &nbsp; Möbius inversion
:<math>\sum_{d \mid n } J_k(d) = n^k.</math> &nbsp; &nbsp; &nbsp;<ref>see references at [[Jordan's totient function]]</ref>
 
:<math>
\sum_{d \mid n } J_k(d) = n^k.
</math> &nbsp; &nbsp; &nbsp;<ref>see references at [[Jordan's totient function]]</ref>
 
::<math>
J_k(n)
Line 330 ⟶ 264:
=n^k\sum_{\delta\mid n}\frac{\mu(\delta)}{\delta^k}.
</math> &nbsp; &nbsp; &nbsp; Möbius inversion
:<math>\sum_{\delta\mid n}\delta^sJ_r(\delta)J_s\left(\frac{n}{\delta}\right) = J_{r+s}(n)</math> &nbsp; &nbsp; &nbsp;<ref>Holden et al. in external links The formula is Gegenbauer's</ref>
 
:<math>\sum_{\delta\mid n}\varphi(\delta)d\left(\frac{n}{\delta}\right) = \sigma(n).</math> &nbsp; &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 288–290</ref><ref>Dineva in external links, prop. 4</ref>
:<math>
:<math>\sum_{\delta\mid n}|\delta^sJ_rmu(\delta)J_s\left(\frac{n}{\delta}\right)| = J_2^{r+s}\omega(n)}.</math> &nbsp; &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 264</ref>
::<math>|\mu(n)|=\sum_{\delta\mid n}\mu\left(\frac{n}{\delta}\right)2^{\omega(\delta)}.</math> &nbsp; &nbsp; &nbsp; Möbius inversion
</math> &nbsp; &nbsp; &nbsp;<ref>Holden et al. in external links The formula is Gegenbauer's</ref>
:<math>\sum_{\delta\mid n}2^{\omega(\delta)}=d(n^2).</math> &nbsp; &nbsp; &nbsp;
 
::<math>2^{\omega(n)}=\sum_{\delta\mid n}\mu\left(\frac{n}{\delta}\right)d(\delta^2).</math> &nbsp; &nbsp; &nbsp; Möbius inversion
:<math>
:<math>\sum_{\delta\mid n}\varphid(\delta^2)=d\left^2(\frac{n}{\delta}\right)=.</math> &nbsp; &nbsp; &nbsp;
::<math>d(n^2)=\sum_{\delta\mid n}\mu\left(\frac{n}{\delta}\right)d^2(\delta).</math> &nbsp; &nbsp; &nbsp; Möbius inversion
\sigma(n).
:<math>\sum_{\delta\mid n}d\left(\frac{n}{\delta}\right)2^{\omega(\delta)}=d^2(n).</math> &nbsp; &nbsp; &nbsp;
</math> &nbsp; &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 288–290</ref><ref>Dineva in external links, prop. 4</ref>
:<math>\sum_{\delta\mid n}\lambda(\delta)=\begin{cases}
 
:<math>
\sum_{\delta\mid n}|\mu(\delta)|=
2^{\omega(n)}.
</math> &nbsp; &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 264</ref>
 
::<math>|\mu(n)|=\sum_{\delta\mid n}\mu\left(\frac{n}{\delta}\right)2^{\omega(\delta)}.
</math> &nbsp; &nbsp; &nbsp; Möbius inversion
 
:<math>
\sum_{\delta\mid n}2^{\omega(\delta)}=
d(n^2).
</math> &nbsp; &nbsp; &nbsp;
 
::<math>2^{\omega(n)}=\sum_{\delta\mid n}\mu\left(\frac{n}{\delta}\right)d(\delta^2).
</math> &nbsp; &nbsp; &nbsp; Möbius inversion
 
:<math>
\sum_{\delta\mid n}d(\delta^2)=
d^2(n).
</math> &nbsp; &nbsp; &nbsp;
 
::<math>d(n^2)=\sum_{\delta\mid n}\mu\left(\frac{n}{\delta}\right)d^2(\delta).
</math> &nbsp; &nbsp; &nbsp; Möbius inversion
 
:<math>
\sum_{\delta\mid n}d\left(\frac{n}{\delta}\right)2^{\omega(\delta)}=
d^2(n).
</math> &nbsp; &nbsp; &nbsp;
 
:<math>
\sum_{\delta\mid n}\lambda(\delta)=\begin{cases}
&1\text{ if } n \text{ is a square }\\
&0\text{ if } n \text{ is not square.}
\end{cases}</math> &nbsp; &nbsp; where λ is the [[Liouville function]].
\end{cases}
:<math>\sum_{\delta\mid n}\Lambda(\delta) = \log n.</math> &nbsp; &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 296</ref>
</math> &nbsp; &nbsp; where λ is the [[Liouville function]].
::<math>\Lambda(n)=\sum_{\delta\mid n}\mu\left(\frac{n}{\delta}\right)\log(\delta).</math> &nbsp; &nbsp; &nbsp; Möbius inversion
 
===Sums of squares===
:<math>
For all <math>k \ge 4,\;\;\; r_k(n) > 0.</math> &nbsp; &nbsp; ([[Lagrange's four-square theorem]]).
\sum_{\delta\mid n}\Lambda(\delta) = \log n.
</math> &nbsp; &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 296</ref>
 
::<math>\Lambda(n)=\sum_{\delta\mid n}\mu\left(\frac{n}{\delta}\right)\log(\delta).
</math> &nbsp; &nbsp; &nbsp; Möbius inversion
 
===Sums of squares===
For all <math>
k \ge 4,\;\;\; r_k(n) > 0.
</math> &nbsp; &nbsp; ([[Lagrange's four-square theorem]]).
:
:<math>
r_2(n) = 4\sum_{d\mid n}\left(\frac{-4}{d}\right),
Line 402 ⟶ 297:
 
There is a formula for r<sub>3</sub> in the section on [[#Class number related|class numbers]] below.
<math display="block">
 
:<math>
r_4(n) =
8 \sum_{\stackrel{d\mid n}{ 4\, \nmid \,d}}d =
Line 411 ⟶ 305:
24\sigma\left(\frac{n}{2^\nu}\right)&\text{if } n \text{ is even }
\end{cases},
</math> &nbsp; &nbsp;
where {{math|1=''ν'' = ''ν''<sub>2</sub>(''n'')}}. &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 386</ref><ref>Hardy, ''Ramanujan'', eqs 9.1.2, 9.1.3</ref><ref>Koblitz, Ex. III.5.2</ref>
 
<math display="block">r_6(n) = 16 \sum_{d\mid n} \chi\left(\frac{n}{d}\right)d^2 - 4\sum_{d\mid n} \chi(d)d^2,</math>
:<math>
r_6where <math> \chi(n) = 16 \sum_{d\mid n} \chi\left(\frac{n-4}{dn}\right)d^2.</math><ref -name="Hardy 4\sum_{d\mid& n}Wright, § 20.13">Hardy \chi(d)d^2& Wright, § 20.13</ref>
</math>
where <math>
\chi(n) = \left(\frac{-4}{n}\right).
</math><ref name="Hardy & Wright, § 20.13">Hardy & Wright, § 20.13</ref>
 
Define the function {{math|1=''σ''<sub>''k''</sub><sup>*</sup>(''n'')}} as<ref>Hardy, ''Ramanujan'', § 9.7</ref>
<math display="block">\sigma_k^*(n) = (-1)^{n}\sum_{d\mid n}(-1)^d d^k=
 
:<math>\sigma_k^*(n) = (-1)^{n}\sum_{d\mid n}(-1)^d d^k=
\begin{cases}
\sum_{d\mid n} d^k=\sigma_k(n)&\text{if } n \text{ is odd }\\
Line 432 ⟶ 321:
That is, if ''n'' is odd, {{math|1=''σ''<sub>''k''</sub><sup>*</sup>(''n'')}} is the sum of the ''k''th powers of the divisors of ''n'', that is, {{math|1=''σ''<sub>''k''</sub>(''n''),}} and if ''n'' is even it is the sum of the ''k''th powers of the even divisors of ''n'' minus the sum of the ''k''th powers of the odd divisors of ''n''.
 
:<math>r_8(n) = 16\sigma_3^*(n).</math> &nbsp; &nbsp;<ref name="Hardy & Wright, § 20.13" /><ref>Hardy, ''Ramanujan'', § 9.13</ref>
:<math>
r_8(n) = 16\sigma_3^*(n).
</math> &nbsp; &nbsp;<ref name="Hardy & Wright, § 20.13" /><ref>Hardy, ''Ramanujan'', § 9.13</ref>
 
Adopt the convention that Ramanujan's {{math|1=''τ''(''x'') = 0}} if ''x'' is '''not an integer.'''
Line 497 ⟶ 384:
 
Extend the Jacobi symbol to accept even numbers in the "denominator" by defining the [[Kronecker symbol]]:
<math display="block">\left(\frac{a}{2}\right) = \begin{cases}
 
:<math>
\left(\frac{a}{2}\right) = \begin{cases}
\;\;\,0&\text{ if } a \text{ is even}
\\(-1)^{\frac{a^2-1}{8}}&\text{ if }a \text{ is odd. }
Line 505 ⟶ 390:
 
Then if ''D'' < −4 is a fundamental discriminant<ref>Cohen, Corr. 5.3.13</ref><ref>see Edwards, § 9.5 exercises for more complicated formulas.</ref>
<math display="block">\begin{align}
 
:<math>
\begin{align}
h(D) & = \frac{1}{D} \sum_{r=1}^{|D|}r\left(\frac{D}{r}\right)\\
& = \frac{1}{2-\left(\tfrac{D}{2}\right)} \sum_{r=1}^{|D|/2}\left(\frac{D}{r}\right).
\end{align}</math>
</math>
 
There is also a formula relating ''r''<sub>3</sub> and ''h''. Again, let ''D'' be a fundamental discriminant, ''D'' < −4. Then<ref>Cohen, Prop 5.3.10</ref>
<math display="block">r_3(|D|) = 12\left(1-\left(\frac{D}{2}\right)\right)h(D).</math>
 
:<math>
r_3(|D|) = 12\left(1-\left(\frac{D}{2}\right)\right)h(D).
</math>
 
===Prime-count related===
Let <math>H_n = 1 + \frac12frac 1 2 + \frac13frac 1 3 + \cdots +\frac{1}{n}</math> &nbsp; be the ''n''th [[harmonic number]]. &nbsp; Then
 
:<math> \sigma(n) \le H_n + e^{H_n}\log H_n</math> &nbsp; is true for every natural number ''n'' if and only if the [[Riemann hypothesis]] is true. &nbsp; &nbsp;<ref>See [[Divisor function#Approximate growth rate|Divisor function]].</ref>
 
The Riemann hypothesis is also equivalent to the statement that, for all ''n'' > 5040,
<math display="block">\sigma(n) < e^\gamma n \log \log n </math> (where γ is the [[Euler–Mascheroni constant]]). This is [[Divisor function#Approximate growth rate|Robin's theorem]].
 
:<math>\sum_{p}\nu_p(n) = \Omega(n).</math>
:<math>\sigma(n) < e^\gamma n \log \log n </math> &nbsp; &nbsp; (where γ is the [[Euler–Mascheroni constant]]). &nbsp; &nbsp; This is [[Divisor function#Approximate growth rate|Robin's theorem]].
:<math>\psi(x)=\sum_{n\le x}\Lambda(n).</math> &nbsp; &nbsp;<ref>Hardy & Wright, eq. 22.1.2</ref>
 
:<math>\Pi(x)= \sum_{n\le x}\frac{\Lambda(n)}{\log n}.</math> &nbsp; &nbsp;<ref>See [[Prime-counting function#Other prime-counting functions|prime-counting functions]].</ref>
:<math>
:<math>e^{\theta(x)}=\prod_{p\le x}p.</math> &nbsp; &nbsp;<ref>Hardy & Wright, eq. 22.1.1</ref>
\sum_{p}\nu_p(n) = \Omega(n).
:<math>e^{\psi(x)}= \operatorname{lcm}[1,2,\dots,\lfloor x\rfloor].</math> &nbsp; &nbsp;<ref>Hardy & Wright, eq. 22.1.3</ref>
</math>
 
:<math>
\psi(x)=\sum_{n\le x}\Lambda(n).
</math> &nbsp; &nbsp;<ref>Hardy & Wright, eq. 22.1.2</ref>
 
:<math>
\Pi(x)= \sum_{n\le x}\frac{\Lambda(n)}{\log n}.
</math> &nbsp; &nbsp;<ref>See [[Prime-counting function#Other prime-counting functions|prime-counting functions]].</ref>
 
:<math>
e^{\theta(x)}=\prod_{p\le x}p.
</math> &nbsp; &nbsp;<ref>Hardy & Wright, eq. 22.1.1</ref>
 
:<math>
e^{\psi(x)}= \operatorname{lcm}[1,2,\dots,\lfloor x\rfloor].
</math> &nbsp; &nbsp;<ref>Hardy & Wright, eq. 22.1.3</ref>
 
===Menon's identity===
In 1965 [[P Kesava Menon]] proved<ref>László Tóth, ''Menon's Identity and Arithmetical Sums ...'', eq. 1</ref>
<math display="block">\sum_{\stackrel{1\le k\le n}{ \gcd(k,n)=1}} \gcd(k-1,n)=\varphi(n)d(n).</math>
:<math>
\sum_{\stackrel{1\le k\le n}{ \gcd(k,n)=1}} \gcd(k-1,n)
=\varphi(n)d(n).
</math>
 
This has been generalized by a number of mathematicians. For example,
* B. Sury<ref>Tóth, eq. 5</ref> <math display="block">
 
B. Sury<ref>Tóth, eq. 5</ref>
:<math>
\sum_{\stackrel{1\le k_1, k_2, \dots, k_s\le n}{ \gcd(k_1,n)=1}} \gcd(k_1-1,k_2,\dots,k_s,n)
= \varphi(n)\sigma_{s-1}(n).</math>
* N. Rao<ref>Tóth, eq. 3</ref> <math display="block">
</math>
 
N. Rao<ref>Tóth, eq. 3</ref>
:<math>
\sum_{\stackrel{1\le k_1, k_2, \dots, k_s\le n}{ \gcd(k_1,k_2,\dots,k_s,n)=1}} \gcd(k_1-a_1,k_2-a_2,\dots,k_s-a_s,n)^s
=J_s(n)d(n), </math> where ''a''<sub>1</sub>, ''a''<sub>2</sub>, ..., ''a''<sub>''s''</sub> are integers, gcd(''a''<sub>1</sub>, ''a''<sub>2</sub>, ..., ''a''<sub>''s''</sub>, ''n'') = 1.
=J_s(n)d(n),
*[[László Fejes Tóth]]<ref>Tóth, eq. 35</ref> <math display="block">
</math>
where ''a''<sub>1</sub>, ''a''<sub>2</sub>, ..., ''a''<sub>''s''</sub> are integers, gcd(''a''<sub>1</sub>, ''a''<sub>2</sub>, ..., ''a''<sub>''s''</sub>, ''n'') = 1.
 
[[László Fejes Tóth]]<ref>Tóth, eq. 35</ref>
:<math>
\sum_{\stackrel{1\le k\le m}{ \gcd(k,m)=1}} \gcd(k^2-1,m_1)\gcd(k^2-1,m_2)
=\varphi(n)\sum_{\stackrel{d_1\mid m_1} {d_2\mid m_2}} \varphi(\gcd(d_1, d_2))2^{\omega(\operatorname{lcm}(d_1, d_2))},
</math> where ''m''<sub>1</sub> and ''m''<sub>2</sub> are odd, ''m'' = lcm(''m''<sub>1</sub>, ''m''<sub>2</sub>).
</math>
where ''m''<sub>1</sub> and ''m''<sub>2</sub> are odd, ''m'' = lcm(''m''<sub>1</sub>, ''m''<sub>2</sub>).
 
In fact, if ''f'' is any arithmetical function<ref>Tóth, eq. 2</ref><ref>Tóth states that Menon proved this for multiplicative ''f'' in 1965 and V. Sita Ramaiah for general ''f''.</ref>
<math display="block">\sum_{\stackrel{1\le k\le n}{ \gcd(k,n)=1}} f(\gcd(k-1,n))
:<math>
=\varphi(n)\sum_{d\stackrel{1\le k\lemid n}\frac{ (\gcdmu*f)(k,nd)=1}} f({\gcdvarphi(k-1d)},n))</math>
=\varphi(n)\sum_{d\mid n}\frac{(\mu*f)(d)}{\varphi(d)},
</math>
where <math>*</math> stands for Dirichlet convolution.
 
===Miscellaneous===
Let ''m'' and ''n'' be distinct, odd, and positive. Then the Jacobi symbol satisfies the law of [[quadratic reciprocity]]:
<math display="block"> \left(\frac{m}{n}\right) \left(\frac{n}{m}\right) = (-1)^{(m-1)(n-1)/4}.</math>
 
Let ''D''(''n'') be the arithmetic derivative. Then the logarithmic derivative <math display="block">\frac{D(n)}{n} = \sum_{\stackrel{p\mid n}{p\text{ prime}}} \frac {v_{p}(n)} {p}.</math> See [[Arithmetic derivative]] for details.
:<math> \left(\frac{m}{n}\right) \left(\frac{n}{m}\right) = (-1)^{(m-1)(n-1)/4}.</math> &nbsp; &nbsp;
 
Let ''D''(''n'') be the arithmetic derivative. Then the logarithmic derivative
: <math>\frac{D(n)}{n} = \sum_{\stackrel{p\mid n}{p\text{ prime}}} \frac {v_{p}(n)} {p}</math> <ref>See [[Arithmetic derivative]]</ref>
 
Let ''λ''(''n'') be Liouville's function. Then
 
:<math>|\lambda(n)|\mu(n) =\lambda(n)|\mu(n)| = \mu(n),</math> &nbsp; &nbsp; and
:<math>\lambda(n)\mu(n) = |\mu(n)| =\mu^2(n).</math> &nbsp; &nbsp;
 
Line 602 ⟶ 448:
:<math>\lambda(n)\mid \phi(n).</math> &nbsp; &nbsp; Further,
 
:<math>\lambda(n)= \phi(n) \text{ if and only if }n=\begin{cases}
1,2, 4;\\
3,5,7,9,11, \ldots \text{ (that is, } p^k \text{, where }p\text{ is an odd prime)};\\
6,10,14,18,\ldots \text{ (that is, } 2p^k\text{, where }p\text{ is an odd prime)}.
\end{cases}</math>
</math>
See [[Multiplicative group of integers modulo n]] and [[Primitive root modulo n]].
&nbsp;
:<math>2^{\omega(n)} \le d(n) \le 2^{\Omega(n)}.</math> &nbsp; &nbsp;<ref>Hardy ''Ramanujan'', eq. 3.10.3</ref><ref>Hardy & Wright, § 22.13</ref>
:<math>
2^{\omega(n)} \le d(n) \le 2^{\Omega(n)}.
</math> &nbsp; &nbsp;<ref>Hardy ''Ramanujan'', eq. 3.10.3</ref><ref>Hardy & Wright, § 22.13</ref>
 
:<math>\frac{6}{\pi^2}<\frac{\phi(n)\sigma(n)}{n^2} < 1.</math> &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 329</ref>
:<math>
\frac{6}{\pi^2}<\frac{\phi(n)\sigma(n)}{n^2} < 1.
</math> &nbsp; &nbsp;<ref>Hardy & Wright, Thm. 329</ref>
 
:<math>\begin{align}
\begin{align}
c_q(n)
&=\frac{\mu\left(\frac{q}{\gcd(q, n)}\right)}{\phi\left(\frac{q}{\gcd(q, n)}\right)}\phi(q)\\
&=\sum_{\delta\mid \gcd(q,n)}\mu\left(\frac{q}{\delta}\right)\delta.
\end{align}</math> &nbsp; &nbsp;<ref>Hardy & Wright, Thms. 271, 272</ref> &nbsp; &nbsp; Note that &nbsp;<math>\phi(q) = \sum_{\delta\mid q}\mu\left(\frac{q}{\delta}\right)\delta.</math> &nbsp; &nbsp;<ref>Hardy & Wright, eq. 16.3.1</ref>
\end{align}
</math> &nbsp; &nbsp;<ref>Hardy & Wright, Thms. 271, 272</ref> &nbsp; &nbsp; Note that &nbsp;<math>\phi(q) = \sum_{\delta\mid q}\mu\left(\frac{q}{\delta}\right)\delta.</math> &nbsp; &nbsp;<ref>Hardy & Wright, eq. 16.3.1</ref>
 
:<math>c_q(1) = \mu(q).</math>
:<math>c_q(q) = \phi(q).</math>
 
:<math>\sum_{\delta\mid n}d^{3}(\delta) = \left(\sum_{\delta\mid n}d(\delta)\right)^2.</math> &nbsp; &nbsp;<ref>Ramanujan, ''Some Formulæ in the Analytic Theory of Numbers'', eq. (C); ''Papers'' p. 133. A footnote says that Hardy told Ramanujan it also appears in an 1857 paper by Liouville.</ref> &nbsp; Compare this with {{math|1=1<sup>3</sup> + 2<sup>3</sup> + 3<sup>3</sup> + ... + ''n''<sup>3</sup> = (1 + 2 + 3 + ... + ''n'')<sup>2</sup>}}
:<math>c_q(q) = \phi(q).
</math>
 
:<math>
\sum_{\delta\mid n}d^{3}(\delta) = \left(\sum_{\delta\mid n}d(\delta)\right)^2.
</math> &nbsp; &nbsp;<ref>Ramanujan, ''Some Formulæ in the Analytic Theory of Numbers'', eq. (C); ''Papers'' p. 133. A footnote says that Hardy told Ramanujan it also appears in an 1857 paper by Liouville.</ref> &nbsp; Compare this with {{math|1=1<sup>3</sup> + 2<sup>3</sup> + 3<sup>3</sup> + ... + ''n''<sup>3</sup> = (1 + 2 + 3 + ... + ''n'')<sup>2</sup>}}
 
:<math>d(uv) = \sum_{\delta\mid \gcd(u,v)}\mu(\delta)d\left(\frac{u}{\delta}\right)d\left(\frac{v}{\delta}\right).
Line 646 ⟶ 481:
== First 100 values of some arithmetic functions ==
{| class="wikitable" style="text-align:right;"
! ''n''!!factorization !! {{phi}}(''n'') !! ''&omega;ω''(''n'') !! &Omega;Ω(''n'') !! {{lambda}}(''n'') !! {{mu}}(''n'') !! {{Lambda}}(''n'') !! {{pi}}(''n'')!! {{sigma}}<sub>0</sub>(''n'')!! {{sigma}}<sub>1</sub>(''n'')!! {{sigma}}<sub>2</sub>(''n'')!! ''r''<sub>2</sub>(''n'')!! ''r''<sub>3</sub>(''n'')!! ''r''<sub>4</sub>(''n'')
|-
| 1||style='text-align:center;'| 1|| 1|| 0|| 0|| 1|| 1|| 0|| 0|| 1|| 1|| 1|| 4|| 6|| 8