From Wikipedia, the free encyclopedia
In number theory , the Dirichlet hyperbola method is a technique to evaluate the sum
∑
n
≤
x
f
(
n
)
,
{\displaystyle \sum _{n\leq x}f(n),}
where
f
,
g
,
h
{\displaystyle f,g,h}
are multiplicative functions with
f
=
g
∗
h
{\displaystyle f=g*h}
, where
∗
{\displaystyle *}
is the Dirichlet convolution . It uses the fact that
∑
n
≤
x
f
(
n
)
=
∑
n
≤
x
∑
a
b
=
n
g
(
a
)
h
(
b
)
=
∑
a
≤
x
∑
b
≤
x
a
g
(
a
)
h
(
b
)
+
∑
b
≤
x
∑
a
≤
x
b
g
(
a
)
h
(
b
)
−
∑
a
≤
x
∑
b
≤
x
g
(
a
)
h
(
b
)
.
{\displaystyle \sum _{n\leq x}f(n)=\sum _{n\leq x}\sum _{ab=n}g(a)h(b)=\sum _{a\leq {\sqrt {x}}}\sum _{b\leq {\frac {x}{a}}}g(a)h(b)+\sum _{b\leq {\sqrt {x}}}\sum _{a\leq {\frac {x}{b}}}g(a)h(b)-\sum _{a\leq {\sqrt {x}}}\sum _{b\leq {\sqrt {x}}}g(a)h(b).}
Uses
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*1}
, the Dirichlet hyperbola method yields the formula
D
(
n
)
=
∑
a
≤
n
∑
b
≤
n
a
1
⋅
1
+
∑
a
≤
n
∑
b
≤
n
a
1
⋅
1
−
∑
a
≤
n
∑
b
≤
n
1
⋅
1
,
{\displaystyle D(n)=\sum _{a\leq {\sqrt {n}}}\sum _{b\leq {\frac {n}{a}}}1\cdot 1+\sum _{a\leq {\sqrt {n}}}\sum _{b\leq {\frac {n}{a}}}1\cdot 1-\sum _{a\leq {\sqrt {n}}}\sum _{b\leq {\sqrt {n}}}1\cdot 1,}
which simplifies to
D
(
n
)
=
2
⋅
∑
a
≤
n
⌊
n
a
⌋
−
⌊
n
⌋
2
,
{\displaystyle D(n)=2\cdot \sum _{a\leq {\sqrt {n}}}\left\lfloor {\frac {n}{a}}\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, further manipulation of this formula yields the estimate[ 1]
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
External links