Dirichlet hyperbola method

Mathematical tool for summing multiplicative functions
An example of the Dirichlet hyperbola method with n = 10 , {\displaystyle n=10,} a 2.7 , {\displaystyle a\approx 2.7,} and b 3.7. {\displaystyle b\approx 3.7.}

In number theory, the Dirichlet hyperbola method is a technique to evaluate the sum

F ( n ) = k = 1 n f ( k ) , {\displaystyle F(n)=\sum _{k=1}^{n}f(k),}

where f {\displaystyle f} is a multiplicative function. The first step is to find a pair of multiplicative functions g {\displaystyle g} and h {\displaystyle h} such that, using Dirichlet convolution, we have f = g h {\displaystyle f=g\ast h} ; the sum then becomes

F ( n ) = k = 1 n x y = k g ( x ) h ( y ) , {\displaystyle F(n)=\sum _{k=1}^{n}\sum _{xy=k}^{}g(x)h(y),}

where the inner sum runs over all ordered pairs ( x , y ) {\displaystyle (x,y)} of positive integers such that x y = k {\displaystyle xy=k} . In the Cartesian plane, these pairs lie on a hyperbola, and when the double sum is fully expanded, there is a bijection between the terms of the sum and the lattice points in the first quadrant on the hyperbolas of the form x y = k {\displaystyle xy=k} , where k {\displaystyle k} runs over the integers 1 k n {\displaystyle 1\leq k\leq n} : for each such point ( x , y ) {\displaystyle (x,y)} , the sum contains a term g ( x ) h ( y ) {\displaystyle g(x)h(y)} , and vice versa.

Let a {\displaystyle a} be a real number, not necessarily an integer, such that 1 < a < n {\displaystyle 1<a<n} , and let b = n / a {\displaystyle b=n/a} . Then the lattice points can be split into three overlapping regions: one region is bounded by 1 x a {\displaystyle 1\leq x\leq a} and 1 y n / x {\displaystyle 1\leq y\leq n/x} , another region is bounded by 1 y b {\displaystyle 1\leq y\leq b} and 1 x n / y {\displaystyle 1\leq x\leq n/y} , and the third is bounded by 1 x a {\displaystyle 1\leq x\leq a} and 1 y b {\displaystyle 1\leq y\leq b} . In the diagram, the first region is the union of the blue and red regions, the second region is the union of the red and green, and the third region is the red. Note that this third region is the intersection of the first two regions. By the principle of inclusion and exclusion, the full sum is therefore the sum over the first region, plus the sum over the second region, minus the sum over the third region. This yields the formula

F ( n ) = k = 1 n f ( k ) = k = 1 n x y = k g ( x ) h ( y ) = x = 1 a y = 1 n / x g ( x ) h ( y ) + y = 1 b x = 1 n / y g ( x ) h ( y ) x = 1 a y = 1 b g ( x ) h ( y ) . {\displaystyle F(n)=\sum _{k=1}^{n}f(k)=\sum _{k=1}^{n}\sum _{xy=k}^{}g(x)h(y)=\sum _{x=1}^{a}\sum _{y=1}^{n/x}g(x)h(y)+\sum _{y=1}^{b}\sum _{x=1}^{n/y}g(x)h(y)-\sum _{x=1}^{a}\sum _{y=1}^{b}g(x)h(y).} (1)

Examples

Let σ 0 ( n ) {\displaystyle \sigma _{0}(n)} be the divisor-counting function, and let D ( n ) {\displaystyle D(n)} be its summatory function:

D ( n ) = k = 1 n σ 0 ( k ) . {\displaystyle D(n)=\sum _{k=1}^{n}\sigma _{0}(k).}

Computing D ( n ) {\displaystyle D(n)} naïvely requires factoring every integer in the interval [ 1 , n ] {\displaystyle [1,n]} ; an improvement can be made by using a modified Sieve of Eratosthenes, but this still requires O ~ ( n ) {\displaystyle {\widetilde {O}}(n)} time. Since σ 0 {\displaystyle \sigma _{0}} admits the Dirichlet convolution σ 0 = 1 1 {\displaystyle \sigma _{0}=1\ast 1} , taking a = b = n {\displaystyle a=b={\sqrt {n}}} in (1) yields the formula

D ( n ) = x = 1 n y = 1 n / x 1 1 + y = 1 n x = 1 n / y 1 1 x = 1 n y = 1 n 1 1 , {\displaystyle D(n)=\sum _{x=1}^{\sqrt {n}}\sum _{y=1}^{n/x}1\cdot 1+\sum _{y=1}^{\sqrt {n}}\sum _{x=1}^{n/y}1\cdot 1-\sum _{x=1}^{\sqrt {n}}\sum _{y=1}^{\sqrt {n}}1\cdot 1,}

which simplifies to

D ( n ) = 2 x = 1 n n x n 2 , {\displaystyle D(n)=2\cdot \sum _{x=1}^{\sqrt {n}}\left\lfloor {\frac {n}{x}}\right\rfloor -\left\lfloor {\sqrt {n}}\right\rfloor ^{2},}

which can be evaluated in O ( n ) {\displaystyle O\left({\sqrt {n}}\right)} operations.

The method also has theoretical applications: for example, Peter Gustav Lejeune Dirichlet introduced the technique in 1849 to obtain the estimate[1][2]

D ( n ) = n log n + ( 2 γ 1 ) n + O ( n ) , {\displaystyle D(n)=n\log n+(2\gamma -1)n+O({\sqrt {n}}),}

where γ {\displaystyle \gamma } is the Euler–Mascheroni constant.

References

  1. ^ Dirichlet, Peter Gustav Lejeune (1849). "Über die Bestimmung der mittleren Werthe in der Zahlentheorie". Abhandlungen der Königlich Preussischen Akademie der Wissenchaften (in German): 49–66 – via Gallica.
  2. ^ Tenenbaum, Gérald (2015-07-16). Introduction to Analytic and Probabilistic Number Theory. American Mathematical Soc. p. 44. ISBN 9780821898543.
  • Discussion of the Dirichlet hyperbola method for computational purposes