Let  $f$ be a real function defined on a neighborhood of $\infty$. Then $f$ is regularly varying and continuous on a neighborhood of $\infty$  if and only if there exists a (unique)  $r \in \RR$ and a slowly varying function $F$ continuous on a neighborhood of $\infty$ such that $f(x) = x^r F(x)$ for all $x \gg 0$.  If those conditions hold, then $f$ is regularly varying of index $r$.
\end{theorem}

\begin{corollary}\label{regdegcor}
Let  $f$ be a real function defined on a neighborhood of $\infty$.    If $f$ is regularly varying and continuous on a neighborhood of $\infty$, then  $\overline{\underline{\deg}} \, f \in \RR$ exists and is equal to the index of regular variation of $f$.
\end{corollary}

\begin{proof}
By the theorem,  the function $f$ is regularly varying of index $r$, and $x^{-r} f(x)$ is slowly varying, for some $r \in \RR$.  By Corollary \ref{svd0}, then, one has  $-r+ \overline{\underline{\deg}} \, f = \overline{\underline{\deg}}(x^{-r} f(x)) = 0$, whence $r = \overline{\underline{\deg}}\, f$.
\end{proof}

By the characterization theorem,  Karamata's integral representation theorem generalizes as follows.

\begin{theorem}\label{karintrep2}
Let  $f$ be a real function defined on a neighborhood of $\infty$.  Then $f$ is regularly varying and continuous on a neighborhood of $\infty$ if and only if there exists an $N > 0$ and continuous functions $C$ and $\eta$ on $[N,\infty)$ such that $\lim_{x \to \infty} C(x) \neq 0$ and $r = \lim_{x \to \infty}x\eta(x)$ exist and $$f(x) = C(x) \exp \int_{N}^x \eta(t) \, dt$$
for all $x \in [N,\infty)$.  Moreover,  if those equivalent conditions hold, then $f$ is regularly varying of index $r$.
\end{theorem}

\begin{proof}
Necessity follows by applying Karamata's integral representation theorem to $f_1(x) = x^{-r}f(x)$, where $r$ is as provided by Theorem \ref{regdeg}, and sufficiency follows by applying Karamata's integral representation theorem to  $\eta_1(x) = \eta(x)-\frac{r}{x}$, where $r = \lim_{x \to \infty}x\eta(x)$.
\end{proof}

The following result characterizes the eventually monotonic  functions that are regularly varying.

\begin{proposition}\label{regvarfun}
Let  $f$ be an eventually nonzero and monotonic real function defined on a neighborhood of $\infty$.  Then $f$ is regularly varying of index $r \in \RR$ if and only if $f(g(x)) \sim c^r f(x) \ (x \to \infty)$ for all $c >0$ and all functions $g$ defined on a neighborhood of $\infty$ with $g(x) \sim cx \ (x \to \infty)$.
\end{proposition}

\begin{proof}
Necessity is clear.  Let $h(x) =g(x)-cx$, so that $h(x) = o(x) \ (x \to \infty)$.   Suppose that $f$ is eventually nondecreasing.  It follows that, for every $\varepsilon > 0$,  one has
$$c^r(1-\varepsilon)^r  \sim \frac{ f(cx-c\varepsilon x)}{f(x)} \leq \frac{f(x+h(x))}{f(x)} \leq \frac{f(cx+c\varepsilon x)}{f(x)} \sim c^r (1+\varepsilon)^r \ (x \to \infty)$$
for all $x \gg 0$, and therefore $$\frac{f(g(x))}{f(x)} = \frac{f(x+h(x))} {f(x) } \sim c^r \  (x \to \infty).$$
The proof when $f$ is eventually nonincreasing is similar, with the inequalities reversed.
\end{proof}

The following result, known as {\bf Karamata's integral theorem}\index{Karamata's integral theorem},  which we use on several occasions in Part 3, is one of the main reasons that the notions of slowly varying and regularly varying functions are so useful.  It can be described as an asymptotic mean value theorem for continuous regularly varying functions.

\begin{theorem}[Karamata's integral theorem]\label{karam}
Let $f$ be a real function that is nonzero and continuous  on $[N,\infty)$, where $N > 0$.
\begin{enumerate}
\item $f$ is regularly varying of index $r > -1$ if and only if there is a constant $s > 0$ such that
$$\frac{1}{x}\int_N^x f(t) \, dt \sim \frac{ f(x)}{s} \ (x \to \infty).$$  Moreover, if those equivalent conditions hold,  then one has
$s = r+1 = |r+1|$.
\item $f$ is regularly varying of index $r < -1$ if and only if the integral $\int_N^\infty f(t) \, dt$ exists and there is a constant $s > 0$ such that
$$\frac{1}{x}\int_x^\infty f(t) \, dt \sim \frac{f(x)}{s} \ (x \to \infty).$$  Moreover, if those  equivalent  conditions hold,  then one has
$s = - (r+1)  = |r+1|$.
\item If $f$ is regularly varying of index $-1$ and $\int_N^\infty f(t) \, dt = \pm \infty$, then
$$f(x) = o\left(\frac{1}{x} \int_N^x f(t) \, dt \right) \ (x \to \infty).$$
\item If $f$ is regularly varying of index $-1$ and $\int_N^\infty f(t) \, dt$ exists, then
$$f(x) = o\left( \frac{1}{x}\int_x^\infty f(t) \, dt \right) \ (x \to \infty).$$
\end{enumerate}
\end{theorem}

\begin{corollary}
Let $f$ be a real function that is nonzero and continuous  on $[N,\infty)$, where $N > 0$.   Then $f$ is slowly
varying if and only if
$$\frac{1}{x}\int_N^x f(t) \, dt \sim f(x) \ (x \to \infty).$$
\end{corollary}

\begin{example}\label{exkar}
For all nonnegative integers $n$, the asymptotic relation
\begin{align*}
\int_e^x \frac{n!\, dt} {(\log t)^{n+1}} +C_n \sim \frac{n!x}{(\log x)^{n+1}} \ (x \to \infty)
\end{align*}
stated previously in (\ref{lias}) follows from Karamata's integral theorem and the fact that  the function $\frac{1}{(\log x)^{n+1}}$ is slowly varying.
\end{example}

\begin{example}
Since the function $\frac{1}{\log x}$ is slowly varying, one has
$$\li(x) = \int_\mu^x \frac{1}{\log t} \, dt \sim \frac{x}{\log x} \ (x \to \infty),$$
where $\mu$ denotes the Ramanujan--Soldner constant.  More generally, for any $r > -1$, the function  $\frac{x^r}{\log x}$ is regularly varying of index $r > -1$, and therefore
$$\li(x^{r+1}) -  \li(\mu^{r+1})= \int_\mu^x \frac{t^r}{\log t} \, dt \sim \frac{x^{r+1}}{(r+1)\log x} \ (x \to \infty)$$
for all $x > 1$.  For $r = -1$, one has
$$\int_e^x \frac{t^{-1}}{\log t}  \, dt = \log \log x.$$
Finally, for $r < -1$, the function  $\frac{x^r}{\log x}$ is regularly varying of index $r < -1$, and therefore
$$\li(x^{r+1}) =- \int_x^\infty \frac{t^r}{\log t} \, dt \sim \frac{x^{r+1}}{(r+1)\log x} \ (x \to \infty)$$
for all $x > 1$.
\end{example}

Karamata's integral theorem  can be viewed  in the following broader context.   Let $f$ be a function that is  Riemann integrable on $[N,x]$  for all $x >N$, where $N \in \RR$.  The {\bf average value $\operatorname{Avg}_f[y,x]$ of $f$ on the interval $[y,x]$}, for any $x > y \geq N$, is defined by
$$\operatorname{Avg}_f[y,x] = \frac{1}{x-y}\int_y^x f(t)\, dt.$$
Note that the power functions $f(x) = Ax^r$ for  $A, r \in \RR$ with $r > -1$ and $A \neq 0$ are characterized as those  real functions $f(x)$,  continuous and nonzero on $(0,\infty)$, such that $f(0^+) \in \{0,\pm \infty\}$ and
$$\operatorname{Avg}_f[0,x] = \frac{f(x)}{s}, \quad \forall x >  0,$$
for some $ s >0$ (where, necessarily,  $s = r+1$).  Indeed, by the fundamental theorem of calculus, the integral equation above  implies $sf = (xf)' = f+xf'$ and therefore $\frac{f'}{f} = \frac{s-1}{x}$.  Statement (1) of Karamata's integral theorem states that the eventually continuous regularly varying functions (of some index $r > -1$)  are characterized as those real functions $f(x)$,  continuous and nonzero on a neighborhood $[N,\infty)$  on $\infty$, such that
$$\operatorname{Avg}_f[N,x] \sim \frac{ f(x)}{s} \ (x \to \infty)$$  for some $ s >0$ (where, necessarily,  $s = r+1$).   Loosely speaking, then,  the continuous regularly varying functions are those continuous functions  whose running average asymptotically  behaves like the running average of a power  function.

Finally,  we note that all of the continuity  hypotheses utilized in this section can be weakened considerably: all of the results stated in this section can be generalized to {\it  (Lebesgue) measurable} functions $[N,\infty) \longrightarrow \RR$, as is typically done in the literature on Karamata theory.  For example, if  $f: [N,\infty) \longrightarrow \RR$ is measurable, then $f$ is regulary varying of index $\overline{\underline{\deg}} \, f \neq \pm \infty$ if $f$ is regularly varying.  Likewise, Karamata's integral representation theorem and  integral theorem extend to this more general setting, where the functions $f$ and $C$ are assumed measurable instead of continuous, and where the Riemann integrals are replaced with Lebesgue integrals.  In particular, since the derivative of a differentiable function is measurable,  one need only assume in Corollary \ref{regvarcor} that $f$ is differentiable (rather than continuously differentiable) on a neighborhood of $\infty$.  Note also that, if $f$ and $g$ are eventually measurable and regularly varying of index $r$ and $s$, respectively,  then $|f|+|g|$ is regularly varying of index $\max(r,s)$, and $f \circ g$ is regularly varying of index $rs$ provided that $\lim_{x \to \infty} g(x) = \infty$.

\chapter{Arithmetic functions}

In this chapter, we study arithmetic functions from the point of view of abstract algebra, e.g., from the point of view groups, rings, and fields, and then from the point of view of real and complex analysis.  The main algebraic tools introduced to study arithmetic functions are {\it Dirichlet convolution}, {\it formal Dirichlet series}, and {\it  formal Euler products}.  Many examples of both {\it multiplicative} and {\it additive} arithmetic functions and their corresponding formal Dirichlet series are provided.    One important analytic tool is a well-known theorem relating the summatory function of an arithmetic function to its Dirichlet series.  Also discussed in this chapter are  {\it Abel's summation formula}, various inversion theorems analogous to the M\"obius inversion theorem, the {\it Dirichlet hyperbola method},  and the notions of the {\it average value} and {\it average order} of an arithmetic function.  Applications are given to the prime counting function and its variants known as the {\it first and second Chebyshev functions} and the {\it Riemann prime counting function}, as well as to the {\it M\"obius function},  the {\it prime Omega function},  the {\it prime omega function}, the {\it divisor function},  and Euler's totient.

\section{Elementary complex functions}

There are several  equivalent ways to define the {\bf complex exponential function}\index{complex exponential function $\exp s = e^s$} $\exp s = e^s$. \index[symbols]{.sz  A@$\exp s$}\index[symbols]{.sz  Aa@$e^s$} The most popular is via its Taylor series $$e^s = \sum_{n = 0}^\infty \frac{s^n}{n!}.$$  Equivalently, $e^s$ is the unique entire function $\exp$ such that $\exp(0) = 0$ and $$\frac{d}{ds} \exp s = \exp s,$$ or, equivalently, the unique entire function  $\exp$ such that $\exp^{(n)}(0) =  1$ for all nonnegative integers $n$.    The author is partial to the definition
\begin{align}\label{EXP}
e^s = \lim_{n \rightarrow \infty} \left(1 + \frac{s}{n}\right)^n
\end{align}
for any complex number $s$ for which the limit exists, for, as we show in Remark \ref{EFpf}, it leads to a simple  ``Calculus 1'' derivation of {\bf Euler's formula} $$e^{a+bi} = e^a(\cos b + i\sin b),
\quad \forall a,b \in \RR.$$
Note that, together with Euler's formula,  the identity $\cos^2x + \sin^2x = 1$ implies that
$$|e^s| = e^{\operatorname{Re} s}, \quad \forall s \in \CC,$$
and the sum laws for $e^x$, $\cos x$, and $\sin x$ imply that
$$e^{s+t} = e^s e^t, \quad \forall s, t \in \CC.$$

The argument of a complex number is unique only up to an additive  integer multiple of $2\pi$.  The {\bf principal branch of the argument of $s$},\index{principal branch $\operatorname{Arg} s$ of the argument of $s$}\index[symbols]{.sz  C@$\operatorname{Arg} s$} denoted $\operatorname{Arg} s$, is taken to be in the interval $(-\pi,\pi]$, where one defines $\operatorname{Arg} 0 = 0$.   Note that
$$e^{i \operatorname{Arg} s}  = \cos\operatorname{Arg} s+ i \sin \operatorname{Arg} s = \frac{s}{|s|}$$
for all $s \in \CC\backslash\{0\}$
and therefore
$$s = |s| e^{i \operatorname{Arg} s}$$
for all $s \in \CC$.   The {\bf principal branch  $\Log s$ of the  complex natural logarithm}\index{principal branch $
\Log s$ of the complex natural logarithm}\index[symbols]{.sz  B@$\Log s$} is the unique complex number $z$ such that $e^z = s$ and  $\operatorname{Im} z \in (-\pi,\pi]$.  For all $s \in \CC\backslash \{0\}$, one has
$$\Log s = \log |s|+i \operatorname{Arg} s$$
$$\exp \Log s = s.$$
However, one has
$$\Log \exp s =   \operatorname{Re} s+ i \operatorname{Arg} \exp s = s+2 \pi i\left\lfloor \frac{1}{2}-\frac{\operatorname{Im} s }{2\pi} \right \rfloor $$
for all $s \in \CC$, and one has $\Log \exp  s = s $ if and only if $\operatorname{Im} s \in (-\pi,\pi]$.
One also has
$$\frac{d}{ds} \Log s = \frac{1}{s}$$
for all $s \in \CC \backslash (-\infty, 0]$.   For all $s_1, s_2, \ldots, s_n \in \CC$, one has
\begin{align*}
\Log (s_1 s_2 \ldots s_n) & = \log |s_1|+\log |s_2| +\cdots+ \log |s_n| + i \operatorname{Arg} (s_1 s_2 \ldots s_n) \\
& = \Log s_1+\Log s_2 +\cdots+ \Log s_n + i \left(\operatorname{Arg} (s_1 s_2 \ldots s_n) -\sum_{k = 1}^n \operatorname{Arg} s_k \right).
\end{align*}
Thus, for example, one has
$$\Log( st) = \Log s + \Log t + i (\operatorname{Arg}( st) - \operatorname{Arg}s-\operatorname{Arg} t),$$
which equals $\Log s+\Log t$ if  $\operatorname{Re}s$ and $\operatorname{Re} t$ are positive.  Note also that
$$\frac{\Log(s)+\Log(1/s)}{2} =  \begin{cases} \displaystyle
0  & \text{if } s\in \CC\backslash (-\infty,0] \\
\pi i & \text{if } s \in (-\infty,0)
\end{cases}$$
for all $s \in \CC$.

Note that one defines
$$x^s = e^{s \log x}$$
for all $x > 0$ and all $s \in \CC$.   More generally,  we let
$$a^s = e^{s \Log a}$$
for all $a,s \in \CC$ with $a \neq 0$.
For all $s \in\CC$, one defines
$$\cosh s = \frac{e^{s}+e^{-s}}{2},$$
$$\sinh s = \frac{e^{s}-e^{-s}}{2},$$
$$\tanh s = \frac{\sinh s }{\cosh s},$$
$$\cos s = \cosh i s,$$
$$\sin s = \frac{1}{i}\sinh i s$$
$$\tan s = \frac{\sin s}{\cos s} = \frac{1}{i}\tanh i s.$$
It follows that
$$e^s = \cos s + i \sin s = \cosh s + \sinh s$$
$$1 = e^s e^{-s} = \cos^2 s + \sin^2 s = \cosh^2 s-\sinh^2 s$$
for all $s \in \CC$.

\begin{remark}[Derivation of Euler's formula]\label{EFpf}  In this remark, we provide a ``Calculus 1''  derivation Euler's formula from the definition (\ref{EXP}) of $e^s$. First, note that the complex numbers $$w_n =  \left(1 + \frac{s}{n}\right)^n$$ are well defined, and they converge to $w \in \CC$ if and only if the real part $a_n$ and imaginary part $b_n$ of $w_n = a_n + ib_n$ converge respectively to the real and imaginary parts of $w$.  Alternatively, the $w_n$ converge to $w$ if and only if the  modulus $r_n$ and  argument $\theta_n$ of $w_n = r_n (\cos \theta_n + i \sin \theta_n)$ converge respectively to the modulus and argument of $w$, provided that one counts angles as equal that differ by an integer multiple of $2\pi$.  We exploit this equivalence to compute the given limit: to compute the limit of $(1+s/n)^n = r_n(\cos \theta_n + i \sin \theta_n)$ as $n \rightarrow
\infty$, we compute the limit of the modulus $r_n$ and the limit of the argument $\theta_n$.    Note first that the complex number $1 + s/n$, where $s = a+bi$, has modulus $((1+a/n)^2 + (b/n)^2)^{1/2}$ and argument $\arctan((b/n)(1+a/n)^{-1})$, where the given arctangent is well-defined if $1+s/n$ is close to $1$, hence if $n$ is sufficiently large.  Raising any complex number to the $n$th power raises its modulus to the $n$th power and multiplies its argument by $n$.  Therefore, the complex number $w_n  = (1+s/n)^n$ has modulus  $$r_n = ((1+a/n)^2 + (b/n)^2)^{n/2}$$ and argument $$\theta_n = n\arctan((b/n)(1+a/n)^{-1}).$$
Using these expressions for $r_n$ and $\theta_n$, we compute their respective limits as $n \to \infty$:
\begin{eqnarray*}
\lim_{n \rightarrow \infty}  r_n & = &
\lim_{n \rightarrow \infty} \left(\left(1+\frac{a}{n}\right)^2+\frac{b^2}{n^2} \right)^{n/2} \\ & = &  \exp \left(\lim_{n \rightarrow \infty} \frac{n}{2} \log \left( \left(1+\frac{a}{n}\right)^2 + \frac{b^2}{n^2} \right)\right) \\
& = & \exp \left(\frac{1}{2}\lim_{x \rightarrow 0} \frac{\log ( (1 +ax)^2+ b^2x^2 )}{x} \right) \\
& = & \exp \left(\left.{\frac{1}{2} \frac{d}{dx}  \log ( (1 +ax)^2+ b^2x^2)}\right|_{x=0} \right)  \\
& = & \exp \left(\left.{\frac{a(1+ax) + b^2x}{(1 +ax)^2+ b^2x^2}} \right|_{x=0} \right) \\
& = & \exp \, a,
\end{eqnarray*}
and likewise
\begin{eqnarray*}
\lim_{n \rightarrow \infty}  \theta_n & = &
\lim_{n \rightarrow \infty} n \arctan \left(\frac{b/n}{1+a/n}\right)  \\
& = & \lim_{x \rightarrow 0} \frac{\arctan \left(\frac{bx}{1+ax}\right)}{x} \\
& = & \left.{\frac{d}{dx} \arctan \left(\frac{bx}{1+ax}\right)}\right|_{x=0}  \\
& = & \left.{\frac{b}{(1+ax)^2 + b^2x^2} }\right|_{x = 0}  \\
& = & b.
\end{eqnarray*}
Thus, the limit of $(1+ s/n)^n$ as $n$ approaches infinity exists and is equal to that complex number with modulus $e^a$ and argument $b$, which is nothing other than $e^a(\cos b + i \sin b)$.  In other words, one has $$e^{a+bi} = \lim_{n \rightarrow \infty} \left(1+ \frac{a+bi}{n} \right)^n = e^a(\cos b + i \sin b),$$
that is,
\begin{align*}
e^s = e^{\operatorname{Re}s} (\cos \operatorname{Im} s + i \sin \operatorname{Im} s)
\end{align*}
for all $s \in \CC$, which is a generalization of Euler's formula to all complex numbers.   The derivation above of Euler's formula is more elementary than the usual ``Calculus 2'' proof using Taylor series in that it relies only upon definitions of the complex exponential function and derivatives  in terms of limits, the derivative formulas for the natural logarithm and arctangent functions, the chain rule, and some basic properties of complex numbers and the trigonometric functions cosine and sine.
\end{remark}

\section{Arithmetic functions and formal Dirichlet series}

Recall that an {\bf arithmetic function} is a function $f: \ZZ_{> 0} \longrightarrow \CC$.
Important arithmetic functions abound in number theory.  We introduced several in Section 1.2, namely, $p_n$, $p_{n+1}-p_n$,  $\chi_{\pp}(n)$, $\phi(n)$, and $\rho(n) = \frac{\phi(n)}{n}$.  We also mentioned the all-important {\it M\"obius function} $\mu$,   which we define later in this section.   The prime counting function $\pi(x)$ restricted to the positive integers is also an arithmetic function.  More generally, any complex-valued function $F(x)$ defined on $[1,\infty)$ restricts to an arithmetic function  $F(n)$ and can be studied as such.

Any arithmetic function $f$ can be alternatively conceptualized as the sequence $$\{f(n)\}_{n = 1}^\infty = (f(1),f(2),f(3),\ldots)$$ of complex numbers indexed by the positve integers, in that this correspondence defines a natural bijection
$$\CC^{\ZZ_{>0}} \longrightarrow \prod_{n = 1}^ \infty \CC.$$
Moreover, the bijection is an isomorphism of rings if one endows the set $\CC^{\ZZ_{>0}}$ of all arithmetic functions with pointwise addition $+$ and pointwise multiplication $\cdot$ and one endows the set $ \prod_{n = 1}^ \infty \CC$ with coordinatewise addition  and coordinatewise multiplication.  Both of these rings have many zerodivisors (those functions assuming the value $0$ at some $n$ and those sequences with some coordinate equal to $0$, respectively) and many invertible elements (precisely those that are not zerodivisors).    However, the operation $\cdot$ of pointwise multiplication on  the set $\CC^{\ZZ_{>0}}$  of all arithmetic functions is by no means the only important operation that endows that set with a ring structure.  Three other important operations are described below.

There are many ways to form a  generating function of a sequence of complex numbers, hence of an arithmetic function, where in combinatorics  the generating function usually lies in  the field $\CC((T)) = \CC[[T]][1/T]$ of {\bf formal Laurent series}\index{formal Laurent series} over $\CC$, which is the quotient field of the integral domain $\CC[[T]]$ of formal power series.  The simplest way to create such a generating function from a function $f: \ZZ_{\geq 0} \longrightarrow \CC$ on the nonnegative integers is via its {\bf formal Taylor series}\index{formal Taylor series}
$$F_f(T) = \sum_{n = 0}^\infty f(n)T^n \in \CC[[T]].$$
For example, for the function $a^{\id}$ with $a^{\id}(n) = a^n$ for all $n$, where $a \in \CC$ is fixed, one has
$$F_{a^{\id}}(T) = 1+aT+a^2T^2+a^3T^3\cdots  = \frac{1}{1-aT}.$$
Note that, for all functions $f,g \in \CC^{\ZZ_{\geq 0}}$, one has
$$F_{f+g}(T) = F_f (T)+ F_g(T)$$
$$F_{f \star g}(T) = F_f(T)F_g(T),$$
where $f \star g$ is the {\bf additive convolution}\index{additive convolution}  of  $f$ and $g$, which  is defined by
\begin{align*}
(f \star g)(n) & = \sum_{a+b = n} f(a)g(b) \\
& = \sum_{k = 0}^{n} f(k)g(n-k) \\
& = f(0)g(n)+f(1)g(n-1)+\cdots+ f(n-1)g(1)+f(n)g(0)
\end{align*}
for all nonnegative integers $n$, where the first sum is over all pairs $(a,b)$ of nonnegative integers $a$ and $b$ such that $a+b = n$.  Thus, the bijection
$$F_{-}(T): \CC^{\ZZ_{\geq 0}} \longrightarrow  \CC[[T]]$$ acting by
$$f \longmapsto F_f(T)$$
is an isomorphism of integral domains if one endows the set $\CC^{\ZZ_{\geq 0}}$ with the operations of (pointwise) addition and additive convolution.    This ring structure is more interesting than that of $\prod_{n = 0}^\infty \CC$, as the ring $\CC[[T]]$  is a {\bf discrete valuation ring},\index{discrete valuation ring} that is, a principal ideal domain with a unique maximal ideal, namely,  in this case, the ideal $(T)$ generated by $T$.  A discrete valuation ring is equivalently a unique factorization domain with at most one prime (or irreducible) element up to associates, and the prime elements of $\CC[[T]]$  are precisely the elements of the set $(T)\backslash (T^2)$.

Another generating function of a function $f\in \CC^{\ZZ_{\geq 0}}$ that is often used is the {\bf exponential generating function} $\sum_{n = 0}^\infty \frac{f(n)}{n!} T^n$.  This is just the formal Taylor series of the arithmetic function  $g(n) = \frac{f(n)}{n!}$, but then multiplication of generating functions corresponds to a different convolution, namely, the {\bf biomial convolution}\index{binomial convolution}
$$(f \square g)(n) =  \sum_{a+b = n} {n \choose a, b} f(a)g(b) = \sum_{k = 0}^{n} {n \choose k} f(k)g(n-k)$$
{\bf of $f$ and $g$}.   Addition and binomial convolution  endow a ring structure on $\CC^{\ZZ_{\geq 0}}$ that is also isomorphic to $\CC[[T]]$, where the map to $\CC[[T]]$ sends $f$ to $\sum_{n = 0}^\infty \frac{f(n)}{n!}T^n$.

The two types of generating functions defined above, and their corresponding convolution products, are the most prevalent in combinatorics.  In number theory, one of the most important generating functions associated to an arithmetic function $f$ is its {\bf formal Dirichlet series}\index{formal Dirichlet series $D_f(X)$}\index[symbols]{.k R@$D_f(X)$}
$$D_f(X) = \sum_{n = 1}^\infty f(n)n^{-X}.$$
Like the expression ``$X^n$,'' the expression ``$n^{-X}$'' is just a formal symbol, and, as with formal power series, we do not consider issues of convergence.   The {\it Dirichlet series of $f$} is obtained from the formal Dirichlet series $D_f(X)$ of $f$ by ``substituting'' a complex variable $s$ for the formal ``variable'' $X$, i.e., by substituting $n^{-s}$ for the monomial $n^{-X}$.  Dirichlet series, for which matters of convergence are relevant, are studied in Section 3.8.

In analogy with the equations $X^m X^n = X^{m+n}$ and $(X^m)^n = X^{mn}$, we write $$m^{-X} n^{-X} = (mn)^{-X}$$
$$(m^{-X})^n = (m^n)^{-X} = m^{-nX}.$$
Formal Dirichlet series, by definition, are added pointwise, so that
$$D_{f}(X) + D_{g}(X)= \sum_{n = 1}^\infty(f(n)+g(n))n^{-X} = D_{f+g}(X),$$
and they are multiplied as follows:
\begin{align*}
D_{f}(X) D_{g}(X) & = \sum_{a = 1}^\infty \sum_{b = 1}^\infty f(a)g(b) a^{-X} b^{-X}\\
& = \sum_{n = 1}^\infty \sum_{ab = n} f(a)g(b) (ab)^{-X}\\
& =  \sum_{n = 1}^\infty \left(\sum_{ab = n} f(a) g(b)\right) n^{-X} \\
& =  \sum_{n = 1}^\infty ((f*g)(n) )n^{-X} \\
& = D_{f * g}(X),
\end{align*}
where $f * g$ is the {\bf Dirichlet convolution},  or {\bf Dirichlet product},\index{Dirichlet convolution $f*g$}\index{Dirichlet product $f*g$} of  $f$ and $g$, defined by
\begin{align*}
(f * g)(n) & = \sum_{ab = n} f(a)g(b) \\
& = \sum_{d|n} f(d)g\left(\frac{n}{d}\right),\index[symbols]{.ia  t@$f*g$}
\end{align*}
where the respective sums are over all ordered pairs $(a,b)$ of positive integers $a$ and $b$ such that $ab = n$, and  over all positive divisors $d$ of $n$.    Thus, for example, one has
$$(f*g)(6) = f(1)g(6)+f(2)g(3)+f(3)g(2)+f(6)g(1).$$
The operations $+$ and $*$ make the set $\CC^{\ZZ_{> 0}}$ into an integral domain called the {\bf ring $\operatorname{Arith}_\CC$ of arithmetic functions (over $\CC$)}.  Let us denote by $\operatorname{Dir}_\CC$ the set of all formal Dirichlet series $D_f(X)$ for $f \in \operatorname{Arith}_\CC$.  Then  $\operatorname{Dir}_\CC$ is also an integral domain under the operations defined above, and the map
$$D_{-}(X): \operatorname{Arith}_\CC \longrightarrow \operatorname{Dir}_\CC$$
acting by
$$f \longmapsto D_f(X)$$
that associates to each arithmetic function its formal Dirichlet series is an isomorphism of integral domains.
Note that the multiplicative identity of the ring $\operatorname{Arith}_\CC$ is the function $\iota = \delta_{1,-}$,\index[symbols]{.q  A@$\iota(n)$}   where $\delta_{i,j}$ denotes the Kronecker delta, so that
$$\iota(n) = \begin{cases} 1 & \quad  \text{if }  n = 1 \\
0  & \quad \text{if } n > 1.
\end{cases}$$
The corresponding element of the ring $\operatorname{Dir}_\CC$ is denoted $1 = 1^{-X}$.

By the fundamental theorem of arithmetic, one can write
$$n^{-X} = \prod_{p} (p^{-X})^{v_p(n)},$$
where $v_p(n)$ for any prime $p$ denotes the exponent of $p$ in the unique prime factorization of $n$.
Let $$X_k = p_k^{-X}$$ for all positive integers $k$, where $p_k$ denotes the $k$th prime.  Then the map
$$\operatorname{Arith}_\CC \longrightarrow \CC[[X_1,X_2,X_3,\ldots]]$$
acting by $$f  \longmapsto \sum_{n = 1}^\infty f(n) \prod_{k= 1}^\infty X_k^{v_{p_k}(n)}$$
is an isomorphism of integral domains, where in the formal power series ring $\CC[[X_1,X_2,X_3,\ldots]]$ one assumes that each monomial $\prod_{k = 1}^\infty X_k^{n_k}$ involves only finitely many variables $X_k$, but where the formal sums  of such monomials in the ring can have arbitrary coefficients.   Thus, one can conceptualize arithmetic functions and formal Dirichlet series as formal power series in a countably infinite number of variables (one for each prime).  The formal Taylor series generating function $F_f(X)$ of $f \in \CC^{\ZZ_{\geq 0}}$ reflects the structure of the positive integers under addition, which is the free commutative semigroup generated by $1$, while the formal Dirichlet series generating function $D_f(X)$ of $f \in \CC^{\ZZ_{>0}}$ reflects the  structure of the positive integers under multiplication, which by the fundamental theorem of arithmetic is the free  commutative monoid generated by the prime numbers.

It is well known that the integral domain $\CC[[X_1,X_2,X_3,\ldots]]$ is a unique factorization domain.  Thus, so is the integral domain ${\operatorname{Arith}}_\CC$.    Moreover, the integral domain $\CC[[X_1,X_2,X_3,\ldots]]$ has a unique maximal ideal, namely, the set of all series with constant coefficient $0$, and thus ${\operatorname{Arith}}_\CC$ has the unique maximal ideal $$\mm_\CC = \{f \in {\operatorname{Arith}}_\CC: f(1) = 0\}.$$    It follows that the invertible elements of the integral domain ${\operatorname{Arith}}_\CC$ are precisely those lying in the group
$${\operatorname{Arith}}_\CC^* = {\operatorname{Arith}}_\CC\backslash \mm_\CC = \{f \in {\operatorname{Arith}}_\CC: f(1) \neq 0\}.$$
under (Dirichlet) multiplication.   For any arithmetic function $f \in \operatorname{Arith}_\CC^*$, we denote its inverse with respect to $*$, called the {\bf Dirichlet inverse of $f$},\index{Dirichlet inverse $f^{*-1}$}\index[symbols]{.ia  t@$f^{*-1}$}  by $f^{*-1}$.  For any $f \in  \operatorname{Arith}_\CC^*$, one has
$$D_{f^{*-1}}(X) = \frac{1}{D_f(X)}.$$

Now,  if $R$ is any ring (commutative with identity), then any  ideal $\aaa$ of $R$ induces a topology on $R$ called the {\it $\aaa$-adic topology}.    In particular, the ring $\CC[[X_1,X_2,X_3,\ldots]]$ has a topology induced by its unique maximal ideal, and it is complete with respect to that topology.  The same thus holds for the rings ${\operatorname{Arith}}_\CC$ and ${\operatorname{Dir}}_\CC$, where the topology on ${\operatorname{Arith}}_\CC$ is the $\mm_\CC$-adic topology.   Equivalently, the topology on  ${\operatorname{Arith}}_\CC$  is just the product topology on $\prod_{n = 1}^\infty \CC$, where $\CC$ has the discrete topology (which of course is not the usual topology on $\CC$).
In fact, there is a {\it  norm} $$\Vert \cdot\Vert : {\operatorname{Arith}}_\CC \longrightarrow \RR_{\geq 0}$$ on ${\operatorname{Arith}}_\CC$, where
$$\Vert f\Vert  = \frac{1}{\inf\{n \in \ZZ_{> 0} : f(n) \neq 0\}} \in \{0\} \cup \{1/n : n \in \ZZ_{> 0}\}  \subseteq \RR_{\geq 0}\index[symbols]{.ia  w@${\Vert f\Vert }$}$$
for all $f \in {\operatorname{Arith}}_\CC$, that induces the $\mm_\CC$-adic topology, where a {\bf norm}\index{norm}  on an integral domain $A$ is a map $| \cdot|  : A \longrightarrow \RR_{\geq 0}$ satisfying the following conditions for all $f, g \in A$.
\begin{enumerate}
\item $| f|  = 0$ if and only if $f = 0$.
\item $| f+g|  \leq |f|+|g|.$
\item $| f g|  = | f|  | g| $.
\end{enumerate}
In this case, $d(f,g) = \vert f-g\vert $ defines a metric, hence a topology, on the ring $A$, called the {\bf norm metric}\index{norm metric}  and {\bf norm topology},\index{norm topology} respectively, induced by the norm $| \cdot |$.    It is clear that addition, subtraction, and multiplication are then continuous as functions from $A\times A \longrightarrow A$, where $A \times A$ has the product topology.    A norm $|\cdot|$ on $A$ is {\bf nonarchimedean} if $| f+g|  \leq \max(| f| ,| g| )$  for all $f, g \in A$, which is much stronger than condition (2) above.     It is straightforward to check that the map $\Vert \cdot \Vert$ is a nonarchimedean norm on the integral domain $\operatorname{Arith}_\CC$.    Two  arithmetic functions  $f, g \in \operatorname{Arith}_\CC$ are close in the induced metric $d(f,g) = \Vert f-g\Vert $ if $\Vert f-g\Vert  \ll 1$, that is,  if $f(n) = g(n)$ for all $n \leq N$ for some $N \gg 0$.   Moreover, the ring ${\operatorname{Arith}}_\CC$ is {\it complete} with respect to the norm metric in the sense that every Cauchy sequence converges.  Note also that $$\operatorname{Arith}_\CC^*  = \{f \in \operatorname{Arith}_\CC: \Vert f\Vert  = 1\}$$ and $$\mm_\CC  = \{f \in \operatorname{Arith}_\CC: \Vert f\Vert  < 1\},$$ and thus the units of $\operatorname{Arith}_\CC$ are the elements of largest norm.

Let $R$ be a subring of $\CC$.  Then the set ${\operatorname{Arith}}_R$  of all $R$-valued arithmetic functions is a subring of  the integral domain ${\operatorname{Arith}}_\CC$, called the {\bf ring of arithmetic functions over $R$},\index{ring of arithmetic functions $\operatorname{Arith}_R$}\index[symbols]{.ia  r@$\operatorname{Arith}_R$} and is isomorphic to the ring $R[[X_1,X_2,X_3,\ldots]]$ of formal power series over $R$ in a countably infinite number of variables.  Moreover, the ideal $$\mm_R = \mm_\CC \cap {\operatorname{Arith}}_R\index[symbols]{.ia  rc@$\mm_R$}$$   is the intersection of all of the maximal ideals  of the integral domain ${\operatorname{Arith}}_R$, and the set
$$1+\mm_R = \{f \in {\operatorname{Arith}}_R: f(1) = 1\}\index[symbols]{.ia  rd@$1+\mm_R$}$$  is a subgroup of the group
$${\operatorname{Arith}}_R^* = \{f \in \operatorname{Arith}_R: f(1) \in R^*\}\index[symbols]{.ia  ra@$\operatorname{Arith}_R^*$}$$
of all units of the integral domain ${\operatorname{Arith}}_R$, where $R^*$ denotes the group of units of the integral domain $R$.

\section{Multiplicative and additive arithmetic functions}

Let $R$ be a subring of $\CC$.  The subset
$${\operatorname{Mult}}_R =  \{f \in {\operatorname{Arith}}_R: f \text{ is multiplicative}\}$$
of $1+\mm_R$, where an arithmetic function $f$ is said to be {\bf multiplicative}\index{multiplicative} if
$$f(1) = 1, \text{ and } f(mn) = f(m)f(n), \quad \forall m,n \in \ZZ_{>0}: \, \gcd(m,n) = 1,$$
is a subgroup of the group $1+\mm_R$.  To gain familiarity with Dirichlet convolution, it is a good exercise to prove that ${\operatorname{Mult}}_R$ is indeed a subgroup of the group $1+\mm_R$.  The  multiplicative arithmetic functions $f$ are freely and uniquely determined by their values $f(p^k)$ at the prime powers $p^k$ for $p$ prime and $k \geq 1$, and for such $f$ one has
$$f(n) = \prod_{p} f(p^{v_p(n)})$$
for all $n$.\index[symbols]{.ia  s@$\operatorname{Mult}_R$}

Many important arithmetic functions that arise in number theory are multiplicative.  In fact, some are even {\it completely multiplicative}, where an arithmetic function $f$ is said to be {\bf completely multiplicative}\index{completely multiplicative} if
$$f(1) = 1, \text{ and } f(mm) = f(m)f(n), \quad \forall m,n \in \ZZ_{>0}.$$  The completely multiplicative functions $f$ are freely and uniquely determined by their values $f(p)$ at the prime numbers $p$, and for such $f$ one has
$$f(n) = \prod_{p} f(p)^{v_p(n)}$$
for all $n$.   Unlike the set of all multiplicative functions, the set of all completely multiplicative functions is not closed under Dirichlet multiplication or Dirichlet inversion.    However, both sets are closed under pointwise multiplication (and also under pointwise reciprocation, for those whose values are all nonzero).

The most obvious completely multiplicative functions are those of the form $\id^a$ for some $a \in\CC$, e.g., the {\bf zeta (arithmetic) function}\index{zeta arithmetic function $\zeta(n)$} $\zeta = \id^0$,\index[symbols]{.q  B@$\zeta(n)$}  which is identically $1$ and has formal Dirichlet series
$$\zeta(X) = D_{\zeta}(X) = \sum_{n = 1}^\infty n^{-X},$$
which is called the {\bf formal Riemann zeta function}.\index{formal Riemann zeta function $\zeta(X)$}  (We abuse notation and use $\zeta$ to denote an arithmetic function, its formal Dirichlet series, and the usual Riemann zeta function, but in any given context it is clear which of the three is intended.)   Since the arithmetic function $\zeta$ is completely multiplicative, its Dirichlet inverse $\zeta^{*-1}$, denoted $\mu$, exists, and is multiplicative.  The function $\mu$ is called the {\bf M\"obius function}\index{Mobius function @ M\"obius function $\mu(n)$} \index[symbols]{.q M@$\mu(n)$}  and is extremely important in number theory and combinatorics.  For all positive integers $n$, one has
\begin{align}\label{mob}
\mu(n) =  \begin{cases} (-1)^{\Omega(n)} = (-1)^{\omega(n)} & \quad  \text{if }  n \text{ is squarefree} \\
0  & \quad \text{if } n \text{ is not squarefree},
\end{cases}
\end{align}
$$\Omega(n) =  \sum_{p|n} v_p(n) =  \sum_p v_p(n)$$
denotes the number of prime factors of $n$ counting multiplicity,  where
$$\omega(n) = \sum_{p| n} 1 = \sum_{p:\, v_p(n) > 0} 1 \leq \Omega(n)$$
denotes the number of distinct prime factors of $n$, and where $n$ is said to be {\bf squarefree}\index{squarefree} if any of the following equivalent conditions hold.
\begin{enumerate}
\item $1$ is the only perfect square that divides $n$.
\item No square of a prime divides $n$.
\item $n$ is a product of distinct primes.
\item $\Omega(n) = \omega(n)$.
\end{enumerate}
The formal Dirichlet series of $\mu$ is given by
$$D_\mu(X) = \frac{1}{\zeta(X)}.$$

The functions $\Omega$ and $\omega$ are also  important arithmetic functions, called the {\bf prime Omega function} and the  {\bf prime omega function}, respectively.\index{prime Omega function $\Omega(n)$}\index{prime omega function $\omega(n)$}\index[symbols]{.rr  N@$\Omega(n)$}\index[symbols]{.rr  O@$\omega(n)$}  Those two arithmetic functions, along with $0$, $\iota$, $\zeta$, and $\mu$, are among the most important arithmetic functions in the algebraic theory of arithmetic functions.   All six of these functions are integer-valued and thus lie in the ring ${\operatorname{Arith}}_\ZZ$.

The functions $\omega$ and $\Omega$ are {\it additive} and {\it completely additive}, respectively, where an arithmetic function $f$ is said to be {\bf additive}\index{additive} if
$$f(mn) = f(m)+f(n), \quad \forall m,n \in \ZZ_{>0}: \, \gcd(m,n) = 1,$$
and where $f$ is said to be {\bf completely additive}\index{completely additive} if
$$f(mn) = f(m)+f(n), \quad \forall m,n \in \ZZ_{>0}.$$  Note that, if $f$ is additive, then necessarily $f(1) = 0$.  The additive functions $f$ are freely and uniquely determined by their values $f(p^k)$ at the prime powers $p^k$ for $p$ prime and $k \geq 1$, and for such $f$ one has
$$f(n) = \sum_{p} f(p^{v_p(n)})$$
for all $n$.  Likewise, the completely additive functions $f$ are freely and uniquely determined by their values $f(p)$ at the prime numbers $p$, and for such $f$ one has
$$f(n) = \sum_{p} {v_p(n)} f(p)$$
for all $n$.  Moreover, for any prime $p$,  the function $v_p$ itself is  a completely additive arithmetic function,  known as the {\bf $p$-adic valuation},\index[symbols]{.rr Na@$v_p(n)$}\index{adic valuation $v_p(n)$}  and the sum $\sum_{p} v_p$ over all primes is equal to $\Omega$.

\begin{remark}[Combinatorial interpretation of $\omega(n)$ and $\Omega(n)$]
For any positive integer $n$, the {\bf divisor lattice of $n$}\index{divisor lattice} is the finite partially ordered set $D(n) = \{d \in \ZZ_{>0}: d | n\}$ of all positive divisors of $n$,  partially ordered by the divides relation $\mid$.  Note that $D(n)$ is a lattice, where least upper bounds coincide with lcms, and greatest lower bounds coincide  with gcds.  Let $P$ be any finite poset.  The {\bf  order dimension of $P$} is the minimal number of totally ordered sets such that $P$ embeds into their product with the componentwise ordering.    The  {\bf height of $P$} is the largest possible cardinality of any totally ordered subset of $P$.   For any positive integer $n$, the positive integer $\omega(n)$ coincides with the order dimension of the poset $D(n)$, while the positive integer $\Omega(n)$ coincides with its height.   Note in fact that all maximal totally ordered subsets of $D(n)$ have cardinality $\Omega(n)$.  The well-studied function $d(n) = \# D(n)$  is called the {\bf divisor function}: see Example \ref{divex}.
\end{remark}

\begin{example}
Let $a_p \in \CC$ for all primes $p$.  Then the arithmetic function
$$f(n) = \prod_{p|n} a_p, \quad \forall n \in \ZZ_{> 0},$$
is multiplicative, and the arithmetic function
$$g(n) = \sum_{p|n} a_p, \quad \forall n\in \ZZ_{> 0},$$ is  additive.  For example, if $a_p = 1-\frac{1}{p}$ for all $p$, then $f(n) = \frac{\phi(n)}{n}$ for all $n$, where $\phi$ denotes  Euler's totient.  On the other hand, if $a_p = 1$ for all $p$, then $g = \omega$.  Arithmetic functions $f$ of the first type are said to be {\bf strongly multiplicative},\index{strongly multiplicative} and arithmetic functions $g$ of the second type are said to be {\bf strongly additive}.\index{strongly additive}   An arithmetic function $h$ is strongly multiplicative (resp., strongly additive) if and only if it is multiplicative (resp., additive) and $h(p^n) = h(p)$ for all primes $p$ and all positive integers $n$. Like the completely multiplicative functions and the completely additive functions, the strongly multiplicative functions and the strongly additive functions are freely and uniquely determined by their values at the prime numbers.
\end{example}

Let $f \in \operatorname{Arith}_\CC$ be an arithmetic function.  The arithmetic function $$\widehat{f} = \zeta* f,$$ given  by
$$\widehat{f}(n)= \sum_{d| n} f(n)$$
for all $n$, is called the {\bf Dirichlet transform of $f$},\index{Dirichlet transform $\widehat{f}$} and the arithmetic function $$\widecheck{f} = \mu* f\index[symbols]{.ia  ta@$\widehat{f}$},$$ given by
$$\widecheck{f}(n) = \sum_{d| n} \mu\left(\frac{n}{d}\right)f(d) = \sum_{d| n} \mu(d)f\left(\frac{n}{d}\right)\index[symbols]{.ia  tb@$\widecheck{f}$}$$
for all $n$, is called the {\bf M\"obius transform of $f$}.\index{Mobius transform @ M\"obius transform $\widecheck{f}$}  Note that, for any arithmetic function $f$, one has
$$D_{\widehat{f}}(X) = \zeta(X) D_f(X)$$
$$D_{\widecheck{f}}(X) =\frac{ D_f(X)}{\zeta(X)}.$$
Since the operation $*$ is associative and $\zeta$ and $\mu$ are inverses with respect to $*$, one has the following result, which is known as the {\bf M\"obius inversion theorem (for Dirichlet convolution)}.\index{Mobius inversion @ M\"obius inversion theorem}

\begin{proposition}[M\"obius inversion theorem for Dirichlet convolution]\label{mobius1}
One has
$$f = \widecheck{\widehat{f}}= \widehat{\widecheck{f}}$$
for all arithmetic functions $f$.   Moreover, if any one of the functions $f$, $\widehat{f}$, and $\widecheck{f}$ is multiplicative, then all three of them are.
\end{proposition}

This is one of many ``inversion'' theorems that are important in number theory and combinatorics.  See Section 3.5 for several others.

Below are examples of  some widely-studied multiplicative arithmetic functions and their corresponding formal Dirichlet series.

\begin{example}\label{divex}  \
\begin{enumerate}
\item For any $a \in \CC$, let  $\sigma_a = \widehat{\id^a}$ denote the Dirichlet transform of the multiplicative function $\id^a$, which is also multiplicative, and which is called the {\bf generalized sum of divisors function}.\index{generalized sum of divisors function $\sigma_a(n)$}\index[symbols]{.rt  C@$\sigma_a(n)$} Thus, one has
$$\sigma_a(n)= \sum_{d|n} d^a$$
for all  $n$.   The function $d(n) = \sigma_0(n)$ is called the {\bf divisor function},\index{divisor function $d(n)$}\index[symbols]{.rt  A@$d(n)$}  since $d(n)= \sum_{d | n} 1$ equals the number of positive divisors of $n$ for all $n$.  The function $\sigma(n) = \sigma_1(n)$ is called the {\bf sum of divisors function},\index{sum of divisors function $\sigma(n)$}\index[symbols]{.rt  B@$\sigma(n)$} since $\sigma(n)= \sum_{d | n} d$ equals the sum of the positive divisors of $n$ for all $n$.  Note that
$$\sigma_{-a}(n) =  \sum_{d|n} d^{-a} = n^{-a} \sum_{d|n} \left(\frac{n}{d}\right)^{a} =n^{-a} \sum_{d|n} d^a = \frac{\sigma_a(n)}{n^a}$$
for all $n$ and all $a \in  \CC$, so, for example,
$$\sigma_{-1}(n) = \frac{\sigma(n)}{n}$$
for all $n$. The formal Dirichlet series of $\id^a$ is written
$$D_{\id^a}(X) = \sum_{n = 1}^\infty n^a n^{-X}  = \sum_{n = 1}^\infty n^{-(X-a)} = \zeta(X-a).$$
More generally,  for any arithmetic function $f$ and any $a \in \CC$, we write
$$D_{\id^a \cdot f}(X) = \sum_{n = 1}^\infty n^a f(n) n^{-X}  = \sum_{n = 1}^\infty f(n) n^{-(X-a)} = D_f(X-a).$$
Using this notation,  one has
$$D_{\sigma_a}(X) = \zeta(X) \zeta(X-a).$$
Thus, for example, one has
$$D_{d}(X) = \zeta(X)^2$$
$$D_{\sigma}(X) = \zeta(X)\zeta(X-1).$$
\item It is not difficult to show that $\widehat{\phi} = \id$, that is,  that
$$\sum_{d|n} \phi(d) = n$$
for all $n$, where $\phi$ denotes Euler's totient.  From M\"obius inversion, it then follows that $\phi = \widecheck{\id}$, that is,
$$\phi(n) = \sum_{d|n} d \mu\left(\frac{n}{d}\right)=  n \sum_{d|n} \frac{\mu(d)}{d}$$
and thus
$$\frac{\phi(n)}{n} = \prod_{p|n} \left( 1-\frac{1}{p} \right)= \sum_{d|n} \frac{\mu(d)}{d}$$
for all $n$, both of which are multiplicative functions.   The formal Dirichlet series of $\phi$ and $\frac{\phi}{\id}$ are given by
$$D_\phi(X) = \frac{\zeta(X-1)}{\zeta(X)}$$
$$D_{\frac{\phi}{\id}}(X) = D_\phi(X+1) =  \frac{\zeta(X)}{\zeta(X+1)},$$
\end{enumerate}
\end{example}

For any arithmetic function $f$ and any prime $p$, the {\bf Bell series of $f$ at $p$}\index{Bell series $B_{f,p}(X)$}\index[symbols]{.k ZA@$B_{f,p}(X)$} is the formal Dirichlet  series
$$B_{f,p}(X) = \sum_{k = 0}^\infty f(p^k)p^{-kX} \in  \operatorname{Dir}_\CC.$$
For all primes $p$, the map
$$B_{-,p}(X) : \operatorname{Dir}_\CC \longrightarrow \operatorname{Dir}_\CC$$
is a ring homomorphism.  In particular, one has
one has
$$B_{f*g,p}(X)  = B_{f,p}(X) B_{g,p}(X)$$
For all arithmetic functions $f$ and $g$.
For any arithmetic function $f$,  there is a unique multiplicative arithmetic function $\operatorname{Mult}(f)$ that agrees with $f$ at every prime power greater than $1$.  If $f \in 1+\mm_\CC$, that is, if $f(1) = 1$, then, on the level of Dirichlet series, one has
$$D_{\operatorname{Mult}(f)}(X) = \prod_{p} B_{f,p}(X),$$
where the product converges in the norm topology.

\begin{proposition}[Euler products of multiplicative and completely multiplicative functions]\label{eulerprod} Let $f \in 1+\mm_\CC$.
\begin{enumerate}
\item $f$ is multiplicative if and only if $f = \operatorname{Mult}(f)$, if and only if
$$D_f(X) = \prod_{p} B_{f,p}(X).$$
\item $f$ is completely multiplicative if and only if $f$ is multiplicative and
$$B_{f,p}(X) = \sum_{k = 0}^\infty f(p)^k(p^{-X})^k = \frac{1}{1-f(p)p^{-X}}$$
for all primes $p$.
\item $f$ is completely multiplicative if and only if $$D_f(X) = \prod_{p} \frac{1}{1-f(p)p^{-X}},$$   if and only if $$ D_{f^{*-1}}(X) =\prod_p(1-f(p)p^{-X}),$$   if and only if $$D_{f^{*-1}}(X) =  D_{\mu \cdot f}(X),$$ if and only if $$f^{*-1} = \mu \cdot f.$$
\end{enumerate}
\end{proposition}

For any multiplicative arithmetic function $f$,  the expression $D_f(X) = \prod_{p} B_{f,p}(X)$ is called the {\bf Euler product representation of $D_f(X)$}.\index{Euler product representation}   For example, one has
$$\zeta(X) = \prod_p  \frac{1}{1-p^{-X}},$$
and, more generally,
$$D_{\id^a}(X) = \prod_p \frac{1}{1-p^ap^{-X}}$$
for all $a \in \CC$.  One also has
$$D_{\mu}(X) = \frac{1}{\zeta(X)} = \prod_p (1-p^{-X}),$$
from which one can immediately derive the expression (\ref{mob}) for $\mu(n)$ stated earlier.

The following proposition is easily verified.

\begin{proposition}\label{additivelem}
An arithmetic function $f$ is additive if and only if $\widecheck{f}(n) \neq 0$ implies that $n$ is a prime power greater than $1$, for any positive integer $n$.
\end{proposition}

Using the proposition above, one can verify the following analogue of Proposition \ref{eulerprod} for  the additive and completely additive arithmetic functions.

\begin{proposition} Let $f$ be an arithmetic function.
\begin{enumerate}
\item For all primes $p$, one has
$$ B_{\widecheck{f},p}(X)  = B_{\mu,p}(X)B_{f,p}(X) = (1-p^{-X}) B_{f,p}(X).$$
\item $f  \in \mm_\CC$ is additive if and only if
$$\frac{D_f(X)} {\zeta(X)} = D_{\widecheck{f}}(X) = \sum_{p} B_{\widecheck{f},p}(X),$$
if and only if
$$D_{f}(X)  = \zeta(X)  \sum_{p} B_{\widecheck{f},p}(X),$$
if and only if
$$D_{f}(X)  = \zeta(X)  \sum_{p} (1-p^{-X}) B_{f,p}(X)$$
(where the given sums converges in the norm topology).
\item  $f$ is completely additive if and only if $f$ is additive and
$$ B_{\widecheck{f},p}(X) =   f(p) \sum_{k = 1}^\infty p^{-kX}$$
for all primes $p$, if and only if $f$ is additive and
$$ B_{f,p}(X) =   f(p) \sum_{k = 1}^\infty k p^{-kX},$$
for all primes $p$,
where also
$$  \sum_{k = 1}^\infty p^{-kX} = \frac{p^{-X}}{1-p^{-X}}$$
$$  \sum_{k = 1}^\infty kp^{-kX} = \frac{p^{-X}}{(1-p^{-X})^2}.$$
\item  $f$ is completely additive if and only if
$$D_{f}(X)  = \zeta(X)  \sum_{p} f(p) \frac{p^{-X}}{1-p^{-X}}.$$
\end{enumerate}
\end{proposition}

\begin{example}
$$D_{\omega}(X) =   \zeta(X) \sum_p p^{-X} =  \zeta(X)P(X)$$
$$D_{\Omega}(X) = \zeta(X) \sum_p   \sum_{k = 1}^\infty p^{-kX} = \zeta(X) \sum_{k = 1}^\infty P(kX),$$
$$P(X) = D_{\chi_{\pp}}(X) = \sum_p p^{-X}$$
is the {\bf formal prime zeta function}, \index{formal prime zeta function $P(X)$} where  $\chi_{\pp}$ is the characteristic function of the set $\pp$  of all primes,
and where one defines  $$D_f(kX)    = \sum_{n = 1}^\infty f(n)(n^k)^{-X}$$
for any arithmetic function $f$ and any positive integer $k$.
\end{example}

If $f \in \operatorname{Arith}_\CC$ is additive (resp., completely additive), then for any $a \in \CC\backslash \{0\}$ the function $a^f$ given by
$$(a^f)(n) = a^{f(n)} = e^{f(n)\Log a}$$
is multiplicative (resp., completely multiplicative).  On the other hand, if $f \in \operatorname{Arith}_\CC$ is multiplicative (resp., completely multiplicative), then for any $a \in \CC $ the function $a \Log f$ is additive (resp., completely additive), provided that $\operatorname{Re}f(n) >0 $ for all $n$ (which guarantees that $\Log (f(m)f(n)) = \Log f(m) + \Log f(n)$ for all $m$ and $n$).  The following two examples are examples of the first construction.

\begin{example}
The completely multiplicative arithmetic function $\lambda = (-1)^\Omega$, that is, the arithmetic function $\lambda$ defined by
$$\lambda(n) = (-1)^{\Omega(n)}$$ for all $n$, is called the {\bf Liouville lambda function}.\index{Liouville lambda function $\lambda(n)$}\index[symbols]{.r  N@$\lambda(n)$}  Note that $\lambda(n)$ is  equal to $1$ if $n$ has an even number of prime factors, and equal to $-1$ if $n$ has an odd number of prime factors, counting multiplicities.    It is not difficult to show that $\widehat{\lambda} = \chi_{\ss}$, where $\ss$ is the set of all perfect squares, that is,
$$\sum_{d|n} \lambda(d) =  \begin{cases} 1 & \quad  \text{if }  n \text{ is a perfect square} \\
0  & \quad  \text{otherwise}.
\end{cases}$$
Therefore, by M\"obius inversion, one has $\lambda = \widecheck{\chi_{\ss}}$ and therefore
$$\lambda(n) = \sum_{d|n} \mu\left(\frac{n}{d}\right)\chi_{\ss}(d) = \sum_{d^2|n} \mu\left(\frac{n}{d^2}\right).$$
Moreover, the Dirichlet inverse of $\lambda$ is given by
$$\lambda^{*-1} = \widehat{(\chi_{\ss})^{*-1}} =  |\mu| = \mu^2 = \mu \cdot \lambda = \chi_{\mathbb{SF}},$$
where $\mathbb{SF}$ is the set of all squarefree integers.  It follows that
$$D_{\chi_{\ss}}(X) = \zeta(2X),$$
$$D_{\lambda}(X) =\frac{1}{D_{|\mu|}(X)} = \frac{\zeta(2X)}{\zeta(X)},$$
and thus
$$D_{|\mu|}(X) = \frac{\zeta(X)}{\zeta(2X)}.$$
\end{example}

\begin{example}
The multiplicative arithmetic function $2^\omega$ at $n$ equals the number $\sum_{d|n} |\mu(d)|$ of squarefree divisors of $n$ for all $n$, and thus $2^\omega = \widehat{|\mu|} = \widehat{ \widehat{(\chi_{\ss})^{*-1}} }$ and $|\mu| =\widecheck{2^\omega}$.    It follows that
$$D_{2^\omega}(X) = \frac{\zeta(X)^2}{\zeta(2X)}.$$
\end{example}

An arithmetic function $f \in 1+\mm_\CC$ is completely multiplicative if and only if $$f^{*-1} = \mu \cdot f,$$
if and only if
$$f \cdot(g*h) = (f \cdot g)*(f \cdot h)$$
for all $g, h \in \operatorname{Arith}_\CC$.   The extensive remark below shows that there is a natural structure of a commutative ring on the group $\operatorname{Mult}_\CC$, where addition in the ring is Dirichlet convolution $*$,  where multiplication is denoted $\odot$, where $\zeta$ is the $1$ of the ring and thus $\mu$ is the $-1$ of the ring, and where $f \odot g = f \cdot g$ if either $f$ or $g$ is completely multiplicative.     This provides a ring-theoretic interpretation of the arithmetic functions $\zeta$ and $\mu$, and  also of the two identities noted above for completely multiplicative arithmetic functions $f$.

\begin{remark}[The rings of multiplicative and additive arithmetic functions {[71]}]\label{muladd}   The definitions of $\operatorname{Arith}_R = R^{\ZZ_{> 0}}$,  $\operatorname{Mult}_R$, and  $\operatorname{Add}_R$ generalize in the obvious way to any commutative ring $R$.     In 2008, the author proved that there exists a uniqiue functorial ring structure, that is functorial in the obvious way (so that a ring homomorphism $\varphi: R \longrightarrow S$ sends $f \in \operatorname{Mult}_R$ to $\varphi \circ f \in \operatorname{Mult}_S$), on the group $\operatorname{Mult}_R$ satisfying properties (1)--(4) below for all $f, g,h \in \operatorname{Mult}_R$, where multiplication in the ring $\operatorname{Mult}_R$ is denoted $\odot$.
\begin{enumerate}
\item Addition in the ring $\operatorname{Mult}_R$ is Dirichlet convolution $*$.
\item The binary operation   $\odot$ on $\operatorname{Mult}_R$ is of {\bf Dirichlet type}: for any positive integer $n$, the value of $f \odot g$ at $n$ depends on $f(d)$ and $g(d)$ only  for the positive integers $d$ dividing $n$.
\item If $f$ and $g$ are completely multiplicative (or, in fact, if either $f$ or $g$ is completely multiplicative), then $f \odot g = f \cdot g$.
\item $\zeta$ is the $1$ of the ring  $\operatorname{Mult}_R$, that is, it is the identity element  with respect to $\odot$.  Equivalently, one has $\zeta \odot f = f$ for all $f$.
\end{enumerate}
One also has the following.
\begin{enumerate}
\item[(5)]  $\mu$ is  the $-1$ of the ring $\operatorname{Mult}_R$, that is, it is the additive inverse of the $1$ of the ring.  Equivalently, one has $\mu \odot f = f^{*-1}$ for all $f$.  Thus, if $f$ is completely multiplicative, then $\mu \cdot f = \mu\odot f = f^{*-1}$.
\item[(6)] Since $\mu \odot \mu = \zeta \neq \mu \cdot \mu$ if $R$ is not the trivial ring, one need not have $f \odot g = f \cdot g$.
\item[(7)] $f \odot(g*h) = (f \odot g)*(f \odot h)$.
\item[(8)] If $f$ is completely multiplicative, then
$$f \cdot(g*h)  =  f \odot(g*h) = (f \odot g)*(f \odot h) =  (f \cdot g)*(f \cdot h).$$
\end{enumerate}
It is not easy  to give an explicit  equation for $(f \odot g)(n)$ for all $n$ in terms of $f(d)$ and $g(d)$ for the positive integers $d$ dividing $n$.  Instead, we can at least give an implicit definition of the operation $\odot$, as follows.  First, we describe a natural ring structure on the set $\operatorname{Add}_R$.  By Proposition \ref{additivelem}, the set $$\mu* \operatorname{Add}_R =  \{\widecheck{f} = \mu*f: f \in \operatorname{Add}_R\}$$ naturally forms a ring under pointwise addition and pointwise multiplication isomorphic to the ring $ \prod_{n = 1}^\infty \prod_p R$ under coordinatewise addition and coordinatewise multiplication.  Since the map
$$\widecheck{-} = \mu*-: \operatorname{Add}_R \longrightarrow \mu* \operatorname{Add}_R$$ is a bijection with inverse $\widehat{-} = \zeta*-$,  we can endow $\operatorname{Add}_R$ with the unique ring structure so that the given bijection is a ring isomorphism.  Equivalently, we endow $\operatorname{Add}_R$  with the unique ring structure so that the bijection
$$ \begin{aligned}   \operatorname{Add}_R &  \longrightarrow \prod_p \prod_{n = 1}^\infty R \\   f & \longmapsto  ((f(p^n)-f(p^{n-1}))_{n = 1}^\infty)_p
\end{aligned}$$
is an isomorphism of rings, where the direct product has coordinatewise addition and coordinatewise multiplication.   Explicitly, addition in the ring $\operatorname{Add}_R$  is pointwise addition $+$, and  if we denote multiplication in the ring $\operatorname{Add}_R$ by $\otimes$, then one has
\begin{align*}
{f \otimes g}  & = \zeta *( (\mu * f) \cdot( \mu * g))  \\ & ={ \widehat{{\widecheck{f}} \cdot{ \widecheck{g}}}}\index[symbols]{.ia tw@$f \otimes g$}
\end{align*}
for all $f, g \in \operatorname{Add}_R$.  Clearly the multiplicative identity of the ring $\operatorname{Add}_R$ is the completely additive function $\Omega$.    One has $$ \mu* \operatorname{Add}_R = \{f \in \operatorname{Arith}_R: f = \chi_{\mathcal{P}}\cdot f\},$$ where $\mathcal{P}$ is the set of all prime powers greater than $1$.  Thus, the function $\chi_{\mathcal{P}}$, with formal Dirichlet series
$$D_{\chi_{\mathcal{P}}}(X) = \sum_p \sum_{k = 1}^\infty (p^k)^{-X} =  \sum_{k = 1}^\infty P(kX) = \frac{D_\Omega(X)}{\zeta(X)},$$
is the multiplicative identity element of the ring $ \mu* \operatorname{Add}_R$ (with respect to $\cdot$), and, by Proposition \ref{additivelem}, an arithmetic function $f$ is additive if and only  if $\widecheck{f} = \chi_{\mathcal{P}} \cdot \widecheck{f}$, if and only if $f =\widehat{ \chi_{\mathcal{P}} \cdot \widecheck{f}}$.

It turns out that the map
\begin{align*}
\widehat{\operatorname{DLog}}: \begin{aligned}   \operatorname{Mult}_R & \longrightarrow \operatorname{Add}_R \\  f & \longmapsto  \zeta*(\Omega\cdot f) * f^{*-1}\index[symbols]{.ia  u@$\widehat{\operatorname{DLog}}(f)$}
\end{aligned}
\end{align*}
is a homomorphism of abelian groups, it is injective if $R$ is $\ZZ$-torsion-free, and it is an isomorphism if $R$ is a field.  The operation $\odot$ is defined to be the unique operation of muliplication on $\operatorname{Mult}_R$ so that the map $\widehat{\operatorname{DLog}}$ is a homomorphism of rings for every ring $R$.  Equivalently, $*$ and $\odot$ are the unique operations  on $\operatorname{Mult}_R$ so that the map
\begin{align*}
\operatorname{DLog}: \begin{aligned}   \operatorname{Mult}_R &  \longrightarrow \mu* \operatorname{Add}_R \\   f & \longmapsto  (\Omega\cdot f) * f^{*-1}\index[symbols]{.ia  ua@$\operatorname{DLog}(f)$}
\end{aligned}
\end{align*}
is a ring homomorphism for every ring $R$.   Thus, one has
$$f * g =  \operatorname{DLog}^{-1}(\operatorname{DLog}(f) + \operatorname{DLog}(g))$$
$$f \odot g =  \operatorname{DLog}^{-1}(\operatorname{DLog}(f) \cdot  \operatorname{DLog}(g))\index[symbols]{.ia tv@$f \odot g$}$$
for all $f, g \in \operatorname{Mult}_R$, if $R$ is $\ZZ$-torsion-free.   The rings  $\operatorname{Mult}_R$ and $\operatorname{Add}_R$ are called the {\bf ring of multiplicative arithmetic functions}, and the {\bf ring of additive arithmetic functions}, respectively, {\bf over $R$}.\index{ring of multiplicative arithmetic functions $\operatorname{Mult}_R$}\index{ring of additive arithmetic functions $\operatorname{Add}_R$}

The operation $\operatorname{DLog}$ on $\operatorname{Mult}_R$, or more generally its extension $f \longmapsto  (\Omega\cdot f) * f^{*-1}$ to the group  $\operatorname{Arith}_R^*$,  is like a logarithmic derivative, because the operation $\partial$ on the ring $\operatorname{Arith}_R$ acting by   $$\partial: f \longmapsto \Omega \cdot f,$$  which is called the {\bf standard derivation of $\operatorname{Arith}_R$},  is analogous to differentiation.\index{standard derivation $\partial$  of $\operatorname{Arith}_R$}\index[symbols]{.ia  u@$\partial(f)$}    As a {\it derivation of $\operatorname{Arith}_R$ over $R$}, the map $\partial$ satisfies the following conditions for all $f, g \in \operatorname{Arith}_R$.
\begin{enumerate}
\item $\partial(a \iota) = 0$ for all $a \in R$.
\item  $\partial(f+g) = \partial(f)+\partial(g)$.
\item $\partial(f*g) = f *\partial(g) + \partial(f) *g$.
\end{enumerate}
More generally, if $h$ is any arithmetic function in $\operatorname{Arith}_R$, then $h$ is completely additive if and only if the operation $\partial_h: f \longmapsto h \cdot f$ on $\operatorname{Arith}_R$ is a derivation of $\operatorname{Arith}_R$ over $R$, that is, if and only if $\partial_h$ satisfies the three conditions above.  Thus, one has $\partial = \partial_\Omega$, and the ring homomorphism $$\widehat{\operatorname{DLog}}: \operatorname{Mult}_R \longrightarrow \operatorname{Add}_R$$ from the ring $\operatorname{Mult}_R$ of all multiplicative arithmetic functions  (under the operations $*$ and $\odot$) to the ring $\operatorname{Add}_R$ of all additive arithmetic functions (under the operations $+$ and $\otimes$) acts by $$\widehat{\operatorname{DLog}}: f \longmapsto  \widehat{\operatorname{DLog}(f)} =  \widehat{\partial(f)*f^{*-1}}.$$

It is clear that the map
\begin{align*}
\begin{aligned}  \operatorname{Mult}_R & \longrightarrow \prod_p (1+TR[[T]]) \\   f &  \longmapsto \left (\sum_{k= 0}^\infty f(p^k)T^k\right)_p
\end{aligned}
\end{align*}
is an isomorphism of abelian groups.  The abelian group $\Lambda(R)  = 1+TR[[T]]$ has the structure of a  {\it lambda ring} and is known as the  {\it universal lambda ring over $R$} [299].  The group isomophism above is a ring isomorphism when $1+TR[[T]]$ is endowed with this ring  structure and $\prod_p (1+TR[[T]])$ the direct product ring structure.  By transport of structure, then, this isomorphism provides an alternative way to construct the ring structure on the group $\operatorname{Mult}_R$.   It follows that the ring  $ \operatorname{Mult}_R $, too, has the structure of a lambda ring, being naturally isomorphic to the ring $\prod_p\Lambda(R) \cong \Lambda( \prod_p R)$.  Moreover, the ring homomorphism $\widehat{\operatorname{DLog}}$  is analogous to the {\it ghost homomorphism} from the ring $\Lambda(R)$ to the ring $\prod_{n= 1}^\infty R$.   Note that the ring $\Lambda(R)$ can be recovered, up to isomorphism,  from the ring $\operatorname{Mult}_R$ as its subring
$$\{f \in \operatorname{Mult}_R: f(p^n) = f(q^n) \text{ for all primes } p,q \text{ and all } n \in \ZZ_{> 0} \} \cong \Lambda(R).$$

See \cite[Section 11]{ell2}  for an application of the results above to the study of schemes of finite type over $\ZZ$.  Another application is to the study of powers of arithmetic functions, described below.

For all $f \in 1+\mm_\CC$ and all $a \in \CC$, define
$$f^{*a} = \sum_{n = 0}^\infty {a \choose n} (f-1)^n,$$
where $$ {a \choose n} = \frac{a(a-1)(a-2)\cdots (a-n+1)}{n!}$$
for all $n$.  The arithmetic function $f^{*a} \in 1+\mm_\CC$  is well-defined, since the series above converges in the norm topology.  Moreover, if $a \in \QQ$, then $f^{*a}$  is interpreted algebraically as the unique $a$th Dirichlet power of $f$, so, for example,  $f^{*2} = f*f$, while $f^{*1/2}$ is the unique arithmetic function $g  \in 1+\mm_\CC$ such that $g * g = f$, and $f^{*-1}$ is the Dirichlet inverse of $f$.  The ``scalar multiplication'' operation $(a,f) \longmapsto f^a$ gives the abelian group $1+\mm_\CC$ the structure of a complex vector space.  Moreover, the group $\operatorname{Mult}_\CC$ is a $\CC$-subspace of $1+\mm_\CC$ and in fact has the structure of a $\CC$-algebra.  For $f \in \operatorname{Mult}_\CC$, an equivalent definition of   $f^{*a}$ is
$$f^{*a} = \zeta^{*a} \odot f,$$
where, by the generalized binomial theorem, one has
$$D_{\zeta^{*a}}(X) = \prod_p \left(1-p^{-X}\right)^{-a} = \prod_p \left(\sum_{n = 0}^\infty (-1)^n {-a \choose n}p^{-nX}\right),$$
and therefore $\zeta^{*a}$ is the unique multiplicative function such that
\begin{align*}
\zeta^{*a}(p^n) & = (-1)^n {-a \choose n}  = \frac{(a)_n}{n!}
\end{align*}
for all prime powers $p^n$, where $(a)_n = a(a+1)(a+2)\cdots(a+n-1)$ denotes the Pochhammer symbol.   The map $a \longrightarrow \zeta^{*a}$ is an embedding of the field $\CC$ in the ring $\operatorname{Mult}_\CC$.
It follows that $d = \zeta * \zeta$ is the $2$, or $1+1$, of the ring $\operatorname{Mult}_\CC$.  More generally, for any positive integer $k$, the function $d_k = \zeta^{*k}$ is the $k = 1+1+\cdots+1$ of the ring $\operatorname{Mult}_\CC$, where $$d_k(n) = \sum_{n = a_1 a_2 \cdots a_k} 1$$ for any $n$ is the number of ways of writing $n$ as a product of $k$ factors (where order matters), and, for any $a \in \CC$, the series $\zeta^{*a}$ is the ``$a$'' of the $\CC$-algebra $\operatorname{Mult}_\CC$.  Moreover, $a\Omega$, which is the completely additive function that weights every prime $p$ by $a$,  is the ``$a$'' of the $\CC$-algebra $\operatorname{Add}_\CC$.

An immediate consequence of the isomorphisms $\widehat{\operatorname{DLog}}$ and $\operatorname{DLog}$ is that, for any multiplicative arithmetic function $f$, the function
$$f^{*a} =  \widehat{\operatorname{DLog}}^{-1}(a \, \widehat{\operatorname{DLog} }f) =  \operatorname{DLog}^{-1}(a \operatorname{DLog} f)$$
is multiplicative for all $a \in \CC$.
Moreover, if $f$ is completely multiplicative, then $f^{*a} = \zeta^{*a} \cdot f$, and therefore $f^{*a}$ is the unique multiplicative function such that
$$f^{*a}(p^n) = \frac{(a)_n}{n!} f(p)^n$$
for all prime powers $p^n$.  Thus, for example, one has
$$\mu(p^n) = \zeta^{*-1}(p^n) =   \frac{(-1)_n}{n!}   = \begin{cases}  1 & \quad \text{if }  n = 0 \\
-1  & \quad \text{if } n = 1 \\
0 & \quad \text{if } n > 1
\end{cases}$$
and, if $f$ is completely multiplicative and $a = -1$, then
\begin{align*}
f^{*-1}(p^n)  & = \begin{cases}  1 & \quad \text{if }  n = 0 \\
-f(p)  & \quad \text{if } n = 1 \\
0 & \quad \text{if } n > 1
\end{cases} \\
& = \mu(p^n) f(p^n),
\end{align*}
from which we recover the fact that $f^{*-1} = \mu \cdot f$.
\end{remark}

In Section 3.8, we study Dirichlet series as complex functions rather than as formal Dirichlet series.

\section{Summatory functions}

As noted in Section 1.2, there are two natural ways to ``analysis-ize'' an arithmetic function $f$.   One way,  discussed in Section 3.8,  is to form its {\bf Dirichlet series} $D_f(s) = \sum_{n = 1}^\infty \frac{f(n)}{n^s}$ as a function of a complex variable $s$.   Another way  is to form the {\bf summatory function $S_f$ of $f$},\index{summatory function $S_f(x)$}\index[symbols]{.k Fr@$S_f(x)$}  which is the function $S_f: \RR_{\geq 0} \longrightarrow \CC$ given by
$$S_f(x) = \sum_{n \leq x} f(n)$$ for all $x \geq 0$, which is defined, more generally, for any function $f$ whose domain contains $\ZZ_{>0}$.   The summatory function $S_f$ of $f$ is a step function that is constant on the interval  $[n-1,n)$, and jumps by the value $+f(n)$ at $n$, for every positive integer $n$.
Note, in particular, that $S_f$ is completely determined by the relations \begin{align*}S_f(0) = 0,\end{align*}
\begin{align*}S_f(x) = S_f(\lfloor x \rfloor), \quad \forall x \geq 0,\end{align*}
and \begin{align*}f(n) = S_f(n)-S_f(n-1), \quad \forall n \in \ZZ_{> 0}.\end{align*}

\begin{example} Let $x \geq 0$.  One has the following.
\begin{enumerate}
\item  $S_\zeta(x) = \lfloor x \rfloor$, where $\zeta(n) = 1$  for all $n$.
\item $S_{\frac{1}{\id}}(x)  = \sum_{n \leq x} \frac{1}{n} = H_{\lfloor x \rfloor}$, where  $H_n$ for any nonnegative integer $n$ denotes  the $n$th harmonic number $H_n =  \sum_{k = 1}^n \frac{1}{k}.$
\item  $S_{\chi_{\pp}}(x) = \pi(x)$, where $\chi_{\pp}$ is the characteristic function of the set $\pp$ of all prime numbers.
\item  $S_\mu(x)  = M(x)$, where $\mu$ is the M\"obius function and $M$ is the famous {\bf Mertens function}\index{Mertens function $M(x)$}\index[symbols]{.st M@$M(x)$}
$$M(x) = \sum_{n \leq x} \mu(n).$$
\item  $S_\lambda(x)  = L(x)$, where $\lambda$ is the Liouville lambda function and $L$ is the  {\bf summatory Liouville  function}\index{summatory Liouville function $L(x)$} \index[symbols]{.st N@$L(x)$}
$$L(x) = \sum_{n \leq x} \lambda(n).$$
\end{enumerate}
\end{example}

If $F: \RR_{\geq 0} \longrightarrow \CC$ is any function, then  $\Delta(F)$ denotes the arithmetic function defined by
\begin{align*}\Delta(F)(n) = F(n)-F(n-1), \quad \forall n \in \ZZ_{> 0}.\end{align*}
One then has
$$\Delta(S_f) = f$$
for any arithmetic function $f$.  Moreover, for any function  $F: \RR_{\geq 0} \longrightarrow \CC$, one has
\begin{align*}S_{\Delta(F)}(x) =  \begin{cases} 0 & \quad \text{if } x \in [0,1) \\
F(\lfloor x \rfloor) & \quad \text{if } x \in [1,\infty)
\end{cases}
\end{align*}
and therefore
\begin{align*}S_{\Delta(F)} = F \quad \Longleftrightarrow  \quad F(0) = 0 \text{ and } F(x) =F(\lfloor x \rfloor), \quad \forall x \geq 0.\end{align*}
The operations $S_{-}$ and $\Delta$ are discrete analogues of integration and differentiation, respectively, and the facts noted above are the discrete analogues of the fundamental theorem of calculus.   Generally, for  a given ``naturally'' defined  arithmetic function $f$, one expects the function $S_f(x)$ to be ``less erratic'' than $f$,  and more amenable to asymptotic  analysis, analogous to how an antiderivative of a function, when it exists, is  ``smoother'' than the original function.  One reason for this is that $\frac{1}{x}S_f(x) = \frac{1}{x}\sum_{n \leq x}f(n)$ represents a running average of $f$, and any erratic behavior in a function tends to be somewhat abated in its running average.

There are many well-known techniques in analytic number theory for studying summatory functions, several of which  are discussed in subsequent sections of this chapter.  One of the most elementary is the following result, which generalizes  \cite[Theorem 1]{apostol} and the method outlined in \cite[Section 1.5 pp.\ 19--20]{iwan}.  It implies that the summatory function $S_g(x)$ of any nonnegative monotonic arithmetic function $g$ is well-approximated by the function $\int_1^x f(t) \, dt$ for any nonnegative monotonic extension $f: [1,\infty) \longrightarrow \RR$ of  $g$ (e.g., for $f(x) = g(\lfloor x\rfloor)$).

\begin{proposition}\label{iwanncor}
Let $f: [N,\infty) \longrightarrow \RR$ be any nonnegative monotonic function on $[N,\infty)$, where $N$ is a positive integer,  and let
$$S_{f,N}(x) = \sum_{N \leq k \leq x} f(k)$$
and  $$F(x)= \int_N^x f(t) \, dt$$
for all $x \geq N$.
\begin{enumerate}
\item If $f$ is nondecreasing on $[N,\infty)$,  then
$$f(N) \leq S_{f,N}(n) -F(n) \leq f(n)$$
for all  integers $n \geq N$  and
$$\left|S_{f,N}(x) -F(x) \right|  \leq f(x)$$
for all $x \geq N$.
\item If $f$ is nonincreasing on $[N,\infty)$,  then the limits $L = \lim_{x \to \infty} f(x) \geq 0$ and
$$0\leq \gamma_{f,N} =\lim_{n \to \infty} \left(\sum_{k = N}^{n-1}f(k)- \int_N^n f(t) \, dt \right) \leq f(N)$$
exist, and one has
$$0 \leq S_{f,N}(n) -F(n) - \gamma_{f,N} \leq f(n)$$
for all  integers $n \geq N$ and
%%%$$\left|S_{f,N}(x) - F(x) - \gamma_f \right |  \leq f(\lfloor x\rfloor)$$
%%%for all $x \geq N$,  and therefore
%%%$$0 \leq \limsup_{x \to \infty} \left|S_{f,N}(x) -F(x) - \gamma_{f,N} \right | \leq L.$$
%%%\item If $f$ is nonincreasing  on $[N,\infty)$ and  $\lim_{x \to \infty} f(x) = 0$, then
%%%$$\gamma_{f,N} =\lim_{x \to \infty} \left(S_{f,N}(x)- \int_N^x f(t) \, dt \right).$$
%%%\item If $f$ is nondecreasing and $f(x) = o(F(x)) \ (x \to \infty)$,  or if $f$ is nonincreasing and $f(\lfloor x \rfloor) = o(F(x)) \ (x \to \infty)$, then one has $$S_{f,N}(x) \sim F(x) \ (x \to \infty).$$
%%%Replace with:
$$\left|S_{f,N}(x) - F(x) - \gamma_{f,N} \right |  \leq f(\lfloor x\rfloor)$$
for all $x \geq N$,  and therefore
$$0 \leq \limsup_{x \to \infty} \left|S_{f,N}(x) -F(x) - \gamma_{f,N} \right | \leq L.$$
\item If $f$ is nondecreasing on $[N,\infty)$ and $f(x) = o(F(x)) \ (x \to \infty)$, then  $$S_{f,N}(x) \sim F(x) \ (x \to \infty).$$
\item If $f$ is nonincreasing  on $[N,\infty)$ and  $\lim_{x \to \infty} f(x) = 0$, then
$$\gamma_{f,N} =\lim_{x \to \infty} \left(S_{f,N}(x)- \int_N^x f(t) \, dt \right).$$
\item If $f$ is nonincreasing on $[N,\infty)$, $\lim_{x \to \infty} f(x) = 0$,  and $\int_N^\infty f(t)\, dt$ exists,
then `
$$\sum_{k = N}^\infty f(k) = \gamma_{f,N} +\int_N^\infty f(t) \, dt,$$
and, if also $f(\lfloor x \rfloor) = o\left(\int_x^\infty f(t)\, dt\right) \ (x \to \infty)$,  then
$$\sum_{k > x} f(k) \sim \int_x^\infty f(t)\, dt \ (x \to \infty).$$
\item If $f$ is increasing (resp., decreasing) on $[N,\infty)$, then the inequalities in (1) (resp., (2)) are strict for all $n >N$ and all $x > N$.
\end{enumerate}
\end{proposition}

\begin{proof}
Note that any monotonic function on a closed interval has only countably many discontinuities and is therefore Riemann integrable.   By a simple linear change of variables, we may assume without loss of generality that $N = 1$.   Suppose that $f$ is nondecreasing.  Then one has
$$0 \leq \sum_{k = 2}^{n}f(k)- \int_1^n f(t) \, dt \leq \sum_{k = 2}^n (f(k)-f(k-1)) = f(n)-f(1)$$
for all positive integers $n$, and thus
$$f(1)-\int_{\lfloor x \rfloor}^x f(t) \, dt \leq S_f(x)- \int_1^x f(t) \, dt \leq f(\lfloor x \rfloor)-\int_{\lfloor x \rfloor}^x f(t) \, dt$$
for all $x \geq 1$.
Therefore, since
$$\{x\}f(\lfloor x \rfloor) \leq \int_{\lfloor x \rfloor}^x f(t) \, dt \leq \{x\} f(x),$$
one has
$$-f(x) \leq f(1) -\{x\} f(x) \leq  S_f(x)- \int_1^x f(t) \, dt \leq f(\lfloor x \rfloor)-\{x\}f(\lfloor x \rfloor) \leq f(x),$$
for all $x \geq 1$.  Statement (1) follows.

%%%Suppose now, that $f$ is nonincreasing.  Since $f$ is nonnegative,  the limit  $\lim_{x \to \infty} f(x)$ exists, and  \cite[pp.\ 409--410]{apostol} (which is a simple geometric argument) implies that the limit $\gamma_f$ exists.  Let
%%%$$E_f(x) = S_f(x)- \int_1^x f(t) \, dt- \gamma_f$$ for all $x \geq 1$.  Again by \cite[pp.\ 409--410]{apostol}, one has
%%%$$0 \leq E_f(n) \leq f(n)$$
%%%for all positive integers $n$, and therefore
%%%$$-f( \lfloor x \rfloor ) \leq -\{x\}f( \lfloor x \rfloor )\leq E_f(x) = E_f(\lfloor x \rfloor)-\int_{\lfloor x \rfloor}^x f(t) \, dt \leq f(\lfloor x \rfloor)-\{x\}f(x) \leq f(\lfloor x \rfloor)$$
%%%for all $x \geq 1$.  Statement (2) follows.  Finally,   statements (3) and (4) follow immediately from (1) and  (2),  and statement (5) follows by modifying the proof of (1) and (2).
Suppose now, that $f$ is nonincreasing.  Since $f$ is nonnegative,  the limit  $\lim_{x \to \infty} f(x)$ exists, and  \cite[pp.\ 409--410]{apostol} (which is a simple geometric argument) implies that the limit $\gamma_{f,N}$ exists.  Let
$$E_f(x) = S_f(x)- \int_1^x f(t) \, dt- \gamma_{f,N}$$ for all $x \geq 1$.  Again by \cite[pp.\ 409--410]{apostol}, one has
$$0 \leq E_f(n) \leq f(n)$$
for all positive integers $n$, and therefore
$$-f( \lfloor x \rfloor ) \leq -\{x\}f( \lfloor x \rfloor )\leq E_f(x) = E_f(\lfloor x \rfloor)-\int_{\lfloor x \rfloor}^x f(t) \, dt \leq f(\lfloor x \rfloor)-\{x\}f(x) \leq f(\lfloor x \rfloor)$$
for all $x \geq 1$.   Statement (2) follows.  Finally,   statements (3)--(5) follow  from (1) and  (2),  and statement (6) follows by modifying the proof of (1) and (2).
\end{proof}

Note that, if $f: [1,\infty) \longrightarrow \RR$ is defined on $[1,\infty)$, then $S_{f,N}(x) = S_f(x)-S_f(N-1)$ for all $x \geq 1$,  and $S_f = S_{f,1}$.   If $\gamma_{f,1}$ exists, then we write $\gamma_f = \gamma_{f,1}$.

\begin{example}\label{stiec} \
\begin{enumerate}
\item One has
$$0 < H_n - \log n - \gamma < \frac{1}{n}$$
for all positive integers $n$ and
$$\left|H_{\lfloor x \rfloor} -\log x - \gamma \right |  < \frac{1}{\lfloor x\rfloor}$$
for all $x \geq 1$, where $\gamma = \gamma_{\frac{1}{\id}}$.  Consequently, one has
$$H_{\lfloor x \rfloor} = \log x + \gamma +  O\left( \frac{1}{x}\right) \ (x \to \infty).$$
\item  [85].  Example (1) generalizes as follows: for any real number $a \geq 0$, one has
$$\sum_{n \leq x} \frac{(\log n)^a}{n} =  \frac{(\log x)^{a+1}}{a+1}  + \gamma_a + O\left(\frac{(\log x)^a}{x}\right) \ (x \to \infty),$$
\begin{align*}
\gamma_a & = \lim_{x \to \infty} \left(\sum_{n \leq x} \frac{(\log n)^a}{n} -  \int_1^x \frac{(\log t)^a}{t}\, dt  \right) \\& =  \lim_{x \to \infty} \left(\sum_{n \leq x} \frac{(\log n)^a}{n} -  \frac{(\log x)^{a+1}}{a+1} \right),
\end{align*}
where ($0^0 = 1$ and) $\gamma_0 = \gamma$ and
$$\lim_{a \to 0^+} \gamma_a  = \gamma -1.$$  For any nonnegative integer $k$, the constant $\gamma_k$ is known as the {\bf $k$th  Stieltjes constant} \cite[(1.12)]{ivic}.\index{Stieltjes constant $\gamma_k$}\index[symbols]{.f tf@$\gamma_k$} See Figure \ref{stielt} for a plot of $\gamma_k$ for $k = 2,3,4,\ldots,31$.   The constant $\gamma_a$ for $a \geq 0$ is known as the {\bf $a$th fractional Stieltjes constant},\index{fractional Stieltjes constant $\gamma_a$}\index[symbols]{.f tfa@$\gamma_a$}  and the function $\gamma_a$ is discontinuous at $a = 0$ but infinitely differentiable on $(0,\infty)$ and thus smoothly interpolates the constant $\gamma_0-1 = \gamma-1$ and the Stieltjes constants $\gamma_k$ for all positive integers $k$.
Moreover,  for all $a \geq 0$ and all $s \in \CC$ with $\operatorname{Re} s > 1$, one has $$ \sum_{n =1}^\infty \frac{(\log n)^a}{n^s} =\frac{\Gamma(a+1)}{(s-1)^{a+1}} +\sum_{n = 0}^\infty \frac{(-1)^n \gamma_{a+n}}{n!}(s-1)^n,$$
where $\Gamma(s)$ denotes the {\it gamma function} (defined in Section 4.1).  See Example \ref{sumex}(3)  and (\ref{stcon}) for further applications of the Stieltjes constants $\gamma_k$ to analytic number theory.
\item  \cite[p.\ 20]{iwan}.  For any nonnegative integer $k$, one has
$$\sum_{n \leq x} (\log n)^k  = x P_k(\log x) + O((\log x)^k) \ (x \to \infty),$$
$$P_k(X) =  \sum_{l = 0}^k (-1)^{k-l} \frac{k!}{l!} X^l \in \ZZ[X].$$
Thus, for example, one has
$$\sum_{n \leq x} \log n  = x \log x -x + O(\log x) \ (x \to \infty).$$
\end{enumerate}
\end{example}

\begin{figure}[ht!]
\includegraphics[width=80mm]{stielt.png}
\caption{\centering Plot of $\gamma_k$ for $k  = 2,3,4,\ldots, 31$}
\label{stielt}
\end{figure}

From Proposition \ref{iwanncor} and Karamata's integral theorem, we obtain the following.

\begin{corollary}\label{karcor}
Let $f: [N,\infty)\longrightarrow \RR$ be continuous, nonnegative, monotonic, and  regularly varying of index $r \in \RR$, where $N$ is a positive integer.  If $r > -1$, then one has
$$\sum_{N \leq k\leq x} f(k) \sim \int_N^x f(t)\, dt \sim \frac{x f(x)}{r+1} \gg 1  \ (x \to \infty).$$  On the other hand, if $r < -1$, then $$ \sum_{k = N}^\infty f(k) = \gamma_{f ,N}+ \int_N^\infty f(t) \, dt$$ exists, and one has
$$\sum_{k > x} f(k)   \sim  \int_x^\infty f(t)\, dt  \sim -\frac{x f(x)}{r+1} \ll 1 \ (x \to \infty).$$
\end{corollary}

\begin{remark}[Measure-theoretic interpretation of summatory functions]\label{measarith}
The summatory function $S_f(x)$ of an arithmetic function $f$ can be interpreted as a {\bf discrete integral of $f$}\index{discrete integral} in the sense that $$S_f(x) = \int_{[1,x]} f(t) \, d \nu(t)$$ for all $x \geq 1$, where $f(t)$ is any extension  of $f$ to $[1,\infty)$,  and where $$\nu = \sum_{n = 1}^\infty \delta_n$$ is the unique {\it discrete measure on the power set of $\RR$ that is supported on $\ZZ_{>0}$ with all weights equal to $1$}, called the {\bf integer measure},\index{integer measure  $\nu$}  where
$\delta_a$ for all $a \in \RR$ is the {\bf Dirac meaure}\index{Dirac measure $\delta_a$} defined by
$$\delta_a(X) = \begin{cases} 1 & \quad \text{if } a \in X \\
0 & \quad \text{if } a \notin X
\end{cases}
for any subset $X$ of $\RR$.      In general, one has
$$\nu(X) = |X\cap \ZZ_{>0}|$$
and, more generally,
$$\int_X f \, d\nu = \sum_{n =1}^\infty f(n) \chi_X(n) = \sum_{n \in X \cap \ZZ_{>0}} f(n),$$
for any subset $X$ of $\RR$ and any function $f$ for which the sum $\sum_{n \in X\cap \ZZ_{>0}} |f(n)|$ is finite, where $\chi_X$ is the characteristic function of $X$.   Thus, for example, the summatory function $$S_{\frac{1}{\id}}(x) = H_{\lfloor x \rfloor} =  \int_{[1,x]} \frac{1}{t} \, d\nu(t)$$ of $\frac{1}{\id}$ is a discrete integral of $\frac{1}{\id}$ and is in this sense the {\bf discrete natural logarithm}.
\end{remark}

\section{Inversion theorems}

As mentioned in Section 3.3, Proposition \ref{mobius1} (the M\"obius inversion theorem for Dirichlet convolution) is one of many inversion theorems.    In this section, we discuss a few others.

We begin with a useful application of Proposition \ref{mobius1}.

\begin{example}
For any prime power $q > 1$, there is a field of $q$ elements, which is unique up to unique isomorphism, and it is denoted $\FF_q$, or  sometimes $\operatorname{GF}(q)$, where ``GF'' stands for ``Galois field.''   Any finite field must have characteristic $p$ for some prime number $p$ and therefore must be a finite dimensional vector space over the field $\FF_p = \ZZ/p\ZZ$.  Therefore any finite field has $q$ elements for some prime power $q>1$, and so the finite fields, up to isomorphism, are
$$\FF_2, \, \FF_3, \, \FF_4, \, \FF_5, \, \FF_7, \, \FF_8, \, \FF_9, \, \FF_{11}, \, \FF_{13}, \, \FF_{16}, \, \FF_{17}, \, \FF_{19}, \, \FF_{23}, \, \FF_{25}, \, \FF_{27}, \,\FF_{29}, \, \FF_{31}, \, \FF_{32}, \, \FF_{36}, \, \FF_{37}, \, \ldots.$$
Moreover, $\FF_{q'}$ is isomorphic to a (unique) subfield of $\FF_{q}$ if and only if $q'$ divides $q$.  Fix any prime power $q> 1$.   Then the product of all monic irreducible polymomials in the polynomial ring $\FF_p[X]$ of degree dividing $n$ is equal to $X^{q^n}-X$, for any integer $n$.  Therefore, if we denote by
$N_n(q)$ the number of monic irreducible polymomials in the polynomial ring $\FF_q[X]$ of degree $n$, then one has
$$q^n = \sum_{d|n} dN_d(q)$$
for all $n$.
From M\"obius inversion, then, it follows that
$$N_n(q) = \frac{1}{n} \sum_{d|n} \mu\left(\frac{n}{d}\right) q^d$$
for all $n$.  The polynomial $$N_n(X) = \frac{1}{n} \sum_{d|n} \mu\left(\frac{n}{d}\right) X^d \in \QQ[X]$$ is called the  {\bf  $n$th necklace polynomial}\index{necklace polynomials}  and also arises naturally in  other contexts, both in algebra and in combinatorics.   The name ``necklace polynomial'' was proposed by Metropolis and Rota in [208] because the $N_n(k)$ for any positive integers $n$ and $k$ is equal to the number of necklaces formed  by $n$ colored beads, from $k$ available colors, that have the property that all of their cyclic rotations are distinct.  From this combinatorial interpretation it follows that polynomial $N_n(X)$ assumes integer values at all of the integers.  For example, if $n = p$ is prime, then $N_p(X) = \frac{1}{p}(X^p-X)$, and thus  the fact that $N_p(X)$ is integer-valued at the integers  is equivalent to Fermat's little theorem.  More generally, if $n = p^k > 1$ is a power of a prime $p$, then $$N_{p^k}(X) = \frac{1}{p^k}\left(X^{p^k}-X^{p^{k-1}}\right),$$
is integer-valued at the integers, which is equivalent to
$$a^{p^k}\equiv a^{p^{k-1}}  \ (\text{mod } p^k), \quad \forall a \in \ZZ.$$
\end{example}

The following result, which (to distinguish it from several other inversion theorems) we call the {\bf  first Dirichlet inversion theorem},\index{Dirichlet inversion theorem} is an obvious generalization of Proposition \ref{mobius1}.

\begin{proposition}[First Dirichlet inversion theorem]
Let $h$ be any arithmetic function possessing a Dirichlet inverse $h^{*-1}$, that is, satisfying $h(1) \neq 0$.
For any arithmetic functions $f$ and $g$, one has
$$g(n)=\sum_{d|n} h(d)f\left({\frac {n}{d}}\right), \quad  \forall n\geq 1,$$
if and only if
$$f(n)=\sum_{d|n}h ^{*-1}(d)g\left({\frac {n}{d}}\right), \quad  \forall n\geq 1.$$
\end{proposition}

Let $f$ and $g$ be arithmetic functions, and let $F, G \in \CC^{\RR_{\geq 1}}$ be arbitrary functions from $\RR_{\geq 1}$ to $\CC$.  We define
$$(f*F)(x) = \sum_{n\leq x}f (n)F\left({\frac {x}{n}}\right), \quad  \forall x\geq 1,$$
which is also a function in $\CC^{\RR_{\geq 1}}$.  Note that
$$f*(F+G) = f*(F+G),$$
$$(f+g)*F = f*F+g*F,$$
$$\iota * F = F,$$
and $$f*1 = S_f.$$
Moreover,  for all $x \geq 1$ one has
\begin{align*}
(g*(f*F))(x) & = \sum_{n\leq x}g (n)(f*F)\left({\frac {x}{n}}\right)  \\
& = \sum_{n\leq x}\sum_{m\leq \frac{x}{n}}g (n)f (m)F\left({\frac {x}{nm}}\right) \\
& =  \sum_{r\leq x}\sum_{nm = r} g (n)f (m)F\left({\frac {x}{r}}\right) \\
& = ((g*f)*F)(x),
\end{align*}
and therefore
$$g*(f*F) = (g*f)*F.$$
It follows that the abelian group $\CC^{\RR_{\geq 1}}$   under addition is a left module over the integral domain $\operatorname{Arith}_\CC$  under the scalar multiplication $(f,F) \longmapsto f *F$.

As  another consequence of the associative property proved above, one has
$$S_{f*g} = (f* g)* 1 = f*(g*1) = f*S_g,$$ and therefore
$$S_{f*g}(x) = \sum_{n \leq x} f(n) S_g\left(\frac{x}{n}\right).$$

\begin{example}\label{piiex}
One has $\pi(x) = S_{\chi_{\pp}}(x)$, where $\chi_{\pp}$ is the characteristic function of the set $\pp$ of all prime numbers. Since also $\omega = \chi_{\pp} * \zeta$ and $\chi_{\pp} = \omega* \mu$,  it follows that
$$S_\omega(x) = \sum_{p \leq x} \left\lfloor \frac{x}{p}\right\rfloor,$$
$$\pi(x) =\sum_{n \leq x} \omega(n) M\left(\frac{x}{n} \right),$$
$$\pi(x) =\sum_{n \leq x} \mu(n) S_\omega\left(\frac{x}{n} \right) = \sum_{n \leq x} \sum_{p\leq \frac{x}{n}} \mu(n)\left\lfloor \frac{x}{pn}\right\rfloor = \sum_{n \leq x}\left( \sum_{p|n} \mu\left(\frac{n}{p}\right) \right)\left\lfloor \frac{x}{n}\right\rfloor.$$
The last equation implies that $\pi = f * \lfloor-\rfloor$, where $f(n) = \sum_{p|n} \mu\left(\frac{n}{p}\right)$ for all $n$.
\end{example}

As yet another consequence of the associative property proved above, we obtain the following result, which we call the {\bf second Dirichlet inversion theorem}.\index{Dirichlet inversion theorem}

\begin{proposition}[Second Dirichlet inversion theorem]\label{mobius2}
Let $h$ be any arithmetic function possessing a Dirichlet inverse $h^{*-1}$, that is, satisfying $h(1) \neq 0$, and let $F$ and $G$ be functions from $\RR_{\geq  1}$ to $\CC$.  Then one has
$$G(x)=\sum_{n\leq x}h(n)F\left({\frac {x}{n}}\right), \quad \forall x\geq 1,$$
if and only if
$$F(x)=\sum_{n\leq x}h^{*-1}(n)G\left({\frac {x}{n}}\right), \quad \forall x\geq 1.$$
\end{proposition}

\begin{example}
By Example \ref{piiex} and Proposition \ref{mobius2}, one has
$$\sum_{p \leq x} \left\lfloor \frac{x}{p}\right\rfloor = S_\omega (x) =\sum_{n \leq x} \pi\left(\frac{x}{n} \right)$$
for all $x \geq 0$.
\end{example}

\begin{corollary}
Let $h$ be any completely multiplicative arithmetic function, and let $F$ and $G$ be functions from $\RR_{\geq  1}$ to $\CC$.  Then one has
$$G(x)=\sum_{n\leq x}h (n)F\left({\frac {x}{n}}\right), \quad  \forall x\geq 1,$$
if and only if
$$F(x)=\sum_{n\leq x}\mu(n)h(n)G\left({\frac {x}{n}}\right), \quad  \forall x\geq 1.$$
\end{corollary}

Applying the corollary to the function $h = \zeta$ that is identically $1$  on $\ZZ_{> 0}$, we obtain the following.

\begin{corollary}
Let $F$ and $G$ be functions from $\RR_{\geq  1}$ to $\CC$.  Then one has
$$G(x)=\sum_{n\leq x}F\left({\frac {x}{n}}\right), \quad  \forall x\geq 1,$$
if and only if
$$F(x)=\sum_{n\leq x}\mu(n) G\left({\frac {x}{n}}\right), \quad  \forall x\geq 1.$$
\end{corollary}

Applying Proposition \ref{mobius2} to the function $F$ that is identically $1$  on $\RR_{\geq 1}$, we obtain the following.

\begin{corollary}
Let $f$ be any arithmetic function with $f(1) \neq 0$.
Then one has
$${1=\sum_{n\leq x}f ^{*-1}(n)S_f\left({\frac {x}{n}}\right)}$$
for all $x \geq 1$.  Consequently, if $f$ is completely multiplicative, then
$${1=\sum_{n\leq x}\mu(n)f(n)S_f\left({\frac {x}{n}}\right)}$$
for all $x \geq 1$.
\end{corollary}

\begin{example}
One has
$$ \sum_{n \leq x} \mu(n)\left \lfloor \frac{x}{n}\right \rfloor = 1 =  \sum_{n \leq x} M\left(\frac{x}{n} \right)$$
$$1 =  \sum_{n \leq x}   \frac{\mu(n)}{n} H_{\lfloor x/n\rfloor}$$
for all $x \geq 1$.
\end{example}

Let $f$ and $g$ be arithmetic functions.  Applying  Proposition \ref{mobius2} to the functions $F(x) = f(\lfloor x \rfloor)$ and $G(x) = g(\lfloor x \rfloor)$, we obtain the following.

\begin{corollary}
Let $f$, $g$, and $h$ be arithmetic functions with $h(1) \neq 0$.
Then one has
$$g(n) = \sum_{m = 1}^n h(m)f\left(\left\lfloor \frac{n}{m}\right\rfloor\right), \quad   \forall n\geq 1,$$
if and only if
$$f(n) = \sum_{m = 1}^n h^{*-1}(m) g\left(\left\lfloor \frac{n}{m}\right\rfloor\right), \quad \forall n\geq 1.$$
\end{corollary}

\begin{remark}[Generalization of second Dirichlet inversion theorem]\label{secondgen}
The second Dirichlet inversion theorem has the following generalization to complex functions.  Let $\Delta$ be any subset of  $\{s \in \CC: |s| \geq 1\}$ such that $\frac{s}{n} \in \Delta$ for all $s \in \Delta$ and all positive integers $n \leq |s|$.
Let $h$ be any arithmetic function satisfying $h(1) \neq 0$, and let $F$ and $G$ be functions from $\Delta$ to $\CC$.  Then one has
$$G(s)=\sum_{n\leq |s|}h(n)F\left({\frac {s}{n}}\right), \quad \forall s \in \Delta,$$
if and only if
$$F(s)=\sum_{n\leq |s|}h^{*-1}(n)G\left({\frac {s}{n}}\right), \quad \forall s\in \Delta.$$
The proof is the same, in that it follows from associativity of the convolution
$$(f*F)(s) = \sum_{n\leq |s|}f (n)F\left({\frac {s}{n}}\right), \quad  \forall s \in \Delta.$$
\end{remark}

Finally, we note the following.

\begin{proposition}\label{thirdD}
Let $f$ and $h$ be arithmetic functions with $h(1) \neq 0$,  and suppose that
$$\sum_{n = 1}^\infty \sum_{m = 1}^\infty |h^{*-1}(n) h(m) f(mn)| < \infty.$$
Let $g$ be the (well-defined) arithmetic function defined by
$$g(n) = \sum_{m = 1}^\infty h(m) f(mn), \quad \forall n \in \ZZ_{> 0}.$$
Then one has
$$f(1) = \sum_{n = 1}^\infty h^{*-1}(n) g(n).$$   More generally, if  $n$ is any positive integer such that
$$\sum_{m = 1}^\infty \sum_{l = 1}^\infty |h^{*-1}(m) h(l) f(lmn)| < \infty,$$
then one has
\begin{align*}
f(n ) = \sum_{m = 1}^\infty h^{*-1}(m) g(mn).
\end{align*}
\end{proposition}

\begin{proof}
It suffices to prove the last statement of the proposition.   To do so, simply note that
\begin{align*}
\sum_{m = 1}^\infty h^{*-1}(m) g(mn) & = \sum_{m = 1}^\infty \sum_{l = 1}^\infty h^{*-1}(m)h(l) f(lmn) \\
& = \sum_{r = 1}^\infty \left(\sum_{lm = r} h^{*-1}(m)h(l) \right) f(rn) \\
& = f(n),
\end{align*}
where the rearrangement of the series follows from the assumption of the absolute convergence of the double sum.
\end{proof}

\section{Asymptotics of summatory functions and prime counting functions}

{\bf Abel's summation formula},\index{Abel's summation formula} stated below, is an extremely useful tool for studying summatory functions.

\begin{theorem}[Abel's summation formula, e.g., {\cite[Proposition 1.4]{kon} \cite[Theorem 1.4]{borg}}]\label{abels}
Let $f$ be an arithmetic function, let $y \leq x$ be nonnegative real numbers, and let $\alpha$ be a continuously differentiable complex-valued function on $[y,x]$.  Then one has
\begin{align*}
S_{\alpha \cdot f} (x)-S_{\alpha \cdot f} (y) = \sum_{y< n \leq x}  \alpha(n) f(n) = \alpha(x)S_f(x)-\alpha(y)S_f(y) - \int_y^x  \alpha'(t)S_f(t) \, dt.
\end{align*}  In particular, if $y \in [0,1)$, then one has
\begin{align*}
S_{ \alpha \cdot f}(x) = \alpha(x) S_f(x)- \int_1^x \alpha'(t)S_f(t)  \, dt.
\end{align*}
\end{theorem}

Abel's summation formula can be proved using the fundamental theorem of calculus \cite[Proposition 1.4]{kon}  or by applying integration by parts for {\it Riemann--Stieltjes integration} to the functions $S_f$ and $\alpha$ \cite[Section 1.1.3]{borg}.  It  can be generalized to the case where $\alpha$ is only assumed to be continuous on $[y,x]$, provided that  the integral is interpreted as a Riemann–Stieltjes integral: in this more general situation, one has
$${\displaystyle S_{\alpha \cdot f} (x)-S_{\alpha \cdot f} (y) = \alpha (x)S_f(x)-\alpha (y)S_f(y)-\int_{y}^{x}S_f(t)\,d\alpha (t).}$$

\begin{remark}[Summation by parts]\label{sumbyparts}
{\bf Summation by parts}, or {\bf partial summation},\index{summation by parts}\index{partial summation}  is a discrete analogue of Abel's summation formula.  It states that, if $f$ and $g$ are arithmetic functions, then
$$S_{ g \cdot f} (n) = g(n+1) S_f(n)  - \sum_{k = 1}^n (g(k+1)-g(k))S_f(k)$$
for all positive integers $n$.
\end{remark}

Applying Abel's summation formula and integration by parts to the arithmetic function $f =\zeta$, we obtain the following.

\begin{corollary}\label{abelcor}
Let $y \leq x$ be nonnegative real numbers, and let $\alpha$ be a continuously differentiable complex-valued function on $[y,x]$. Then one has
\begin{align*}
S_{ \alpha} (x)-S_{\alpha} (y)  = \sum_{y< n \leq x} \alpha(n) &= \lfloor x \rfloor \alpha(x) -\lfloor y \rfloor \alpha(y) - \int_y^x \lfloor t \rfloor  \alpha'(t)  \, dt \\
&=\int_y^x \alpha(t)\, dt - \{x\} \alpha(x) +\{y\} \alpha(y) + \int_y^x \{ t\}  \alpha'(t)  \, dt.
\end{align*}
In particular, if $y \in [0,1)$, then one has
\begin{align*}
S_{\alpha}(x) = \lfloor x \rfloor \alpha(x) - \int_1^x \lfloor t \rfloor \alpha'(t) \, dt = \int_1^x \alpha(t)\, dt - \{x\} \alpha(x) +\alpha(1)+ \int_1^x \{ t\}  \alpha'(t)  \, dt.
\end{align*}
\end{corollary}

A simple application of Corollary \ref{abelcor} yields the weak form of Stirling's approximation provided in the following example.

\begin{example}
For the function $\alpha(x) = \log x$,  Corollary \ref{abelcor} yields
\begin{align*}
\log (\lfloor x \rfloor!) = \sum_{n \leq x} \log n &  = \int_1^x \log t \, dt  -\{x\} \log x+ \int_1^x\frac{ \{t\}}{t}\, dt \\
& = x \log x -x +1-\{x\} \log x+ \int_1^x\frac{ \{t\}}{t}\, dt  \\
& = x\log x -x + O(\log x) \ (x\to \infty)
\end{align*}
for all $x \geq 1$.
\end{example}

Another application of  Corollary \ref{abelcor}  is to the Euler--Mascheroni constant $\gamma$ and the  harmonic numbers $H_n$.

\begin{example}\label{harmex}
For the function $\alpha(x) = \frac{1}{x}$,  Corollary \ref{abelcor}  yields
\begin{align*}
H_{\lfloor x \rfloor} & =  \frac{\lfloor x \rfloor}{x}  + \int_1^x \frac{\lfloor t \rfloor }{t^2} \, dt \\
& = \log x -\frac{\{x\}}{x}+ 1- \int_1^x \frac{\{t\}}{t^2} \, dt
\end{align*}
for all $x \geq 1$.  It follows that
$$H_{\lfloor x \rfloor} - \log x  = -\frac{\{x\}}{x}+ 1- \int_1^x \frac{\{t\}}{t^2} \, dt \to 1- \int_1^\infty \frac{\{t\}}{t^2} \, dt$$
as $x \to \infty$, since the given integral converges by the comparison test.  This proves that the Euler--Mascheroni constant $\gamma$ exists and is given by $$\gamma =  1- \int_1^\infty \frac{\{t\}}{t^2} \, dt.$$
It follows, then, that
$$-\frac{1}{x} \leq -\frac{\{x\}}{x}\leq  H_{\lfloor x \rfloor} - \log x-\gamma  = -\frac{\{x\}}{x}+\int_x^\infty \frac{\{t\}}{t^2} \, dt \leq  \int_x^\infty \frac{\{t\}}{t^2} \, dt \leq \frac{1}{x},$$
and therefore
$$ H_{\lfloor x \rfloor} - \log x-\gamma  =  O\left(\frac{1}{x}\right) \ (x \to \infty)$$
for all $x \geq 1$.  Consequently,  one has
$$H_{\lfloor x \rfloor} \sim \log x \ (x \to \infty).$$
\end{example}

An application analogous to Example \ref{harmex} of  Abel's summation formula yields the following result relating Mertens' second theorem to the prime counting function.   Recall that  Mertens' second theorem states that the limit
$$M = \lim_{x \to \infty} \left( \sum_{p \leq x} \frac{1}{p} - \log \log x \right) = 0.261497212847\ldots,$$
known as the Meissel--Mertens constant, exists.  Let
$$\Mert(x) =\sum_{p \leq x} \frac{1}{p}  -  \log \log x-M$$
for all $x> 1$.

\begin{proposition}\label{psthm}
For all $x > 1$ one has
\begin{align*}
\sum_{p \leq x} \frac{1}{p} & = \frac{\pi(x)}{x} + \int_1^x \frac{ \pi(t)}{t^2}\, dt,
\end{align*}
\begin{align*}
\pi(x)  = x \sum_{p \leq x}\frac{1}{p} - \int_1^x \left(\sum_{p \leq t}\frac{1}{p} \right)  dt,
\end{align*}
\begin{align*}
\Mert(x)+ \frac{\li(x)-\pi(x)}{x} &=  \int_x^\infty \frac{ \li(t)-\pi(t)}{t^2}\, dt  \\ &= H- \int_1^x \frac{ \li(t)-\pi(t)}{t^2}\, dt  \\
& =  \frac{H}{x} + \frac{1}{x} \int_1^x M_2(t) \, dt,
\end{align*}
$$H=   \int_1^\infty  \frac{\li(t)-\pi(t)}{t^{2}} \, dt = \gamma -M = 0.315718452053\ldots.$$
\end{proposition}

\begin{proof}
Abel's summation formula and integration by parts yield
\begin{align*}
\sum_{p \leq x} \frac{1}{p} & = \frac{\pi(x)}{x} + \int_1^x \frac{ \pi(t)}{t^2}\, dt  \\
& = \log \log x+\gamma+ \frac{\pi(x)-\li(x)}{x} + \int_1^x \frac{ \pi(t)-\li(t)}{t^2}\, dt
\end{align*}
and therefore
\begin{align*}
\Mert(x)& = - \frac{\li(x)-\pi(x)}{x}+ \gamma-M- \int_1^x \frac{ \li(t)-\pi(t)}{t^2}\, dt
\\
& = - \frac{\li(x)-\pi(x)}{x} + \int_x^\infty \frac{ \li(t)-\pi(t)}{t^2}\, dt,
\end{align*}
where  the integral
$$H :=   \int_1^\infty  \frac{\li(t)-\pi(t)}{t^{2}} \, dt = \gamma-M$$
exists by Mertens' second theorem and the fact that
$$\lim_{x \to \infty} \frac{\li(x)-\pi(x)}{x}  = 0$$
which  in turn follows from  $\pi(x) = o(x)\ (x \to \infty)$ and $\li(x) = o(x)\ (x \to \infty)$.

Now, let $\pi_{-1}(x) =  \sum_{p \leq x} \frac{1}{p}$.  Abel's summation formula and integration by parts yield
\begin{align*}
\pi(x) &  = x \pi_{-1}(x)- \int_1^x \pi_{-1}(t)\, dt \\ &  =  x( \pi_{-1}(x)-\log\log x) -\gamma+ \li(x)- \int_1^x\left( \pi_{-1}(t)-\log \log t\right)  dt
\end{align*}
and therefore
\begin{align*}
\frac{\li(x)-\pi(x)}{x} &  = -(\pi_{-1}(x)- \log \log x) + \frac{1}{x} \left(\gamma+\int_1^x\left( \pi_{-1}(t)-\log \log t\right)  dt \right)  \\
& = -M_2(t)-M + \frac{\gamma}{x}+  \frac{1}{x} \int_1^x M_2(t) \, dt + \frac{x-1}{x}M \\
& = -M_2(t) + \frac{H}{x}+  \frac{1}{x} \int_1^x M_2(t) \, dt.
\end{align*}
The proposition follows.
\end{proof}

Proposition \ref{psthm} implies that Mertens' second theorem is essentially equivalent to the convergence of the integral  $\int_1^\infty  \frac{\li(t)-\pi(t)}{t^{2}} \, dt$.   Mertens actually proved the stronger result that
$$\left|\sum_{p \leq x} \frac{1}{p}  -  \log \log x- M\right| < \frac{4}{\log x}, \quad\forall x \geq 2,$$
which one can show follows from Abel's summation formula and Mertens' first theorem (\ref{mert1}).
It follows that
\begin{align*}
\sum_{p \leq x} \frac{1}{p}  =  \log \log x+ M + O\left( \frac{1}{\log x} \right) \ (x \to \infty),
\end{align*}
which, given Proposition \ref{psthm} and Chebyshev's 1850 result below,  is equivalent to
$$\int_x^\infty \frac{ \li(t)-\pi(t)}{t^2}\, dt = O\left( \frac{1}{\log x} \right) \ (x \to \infty).$$

\begin{theorem}[{[46]}]\label{chebasymp}
One has $$\pi(x) \asymp \frac{x}{\log x} \ (x \to \infty).$$
\end{theorem}

For the remainder of this section, we assume Chebyshev's theorem above.  We will not assume the full strength of  the prime number theorem until Chapter 5.

Let $\vartheta(x)$ denote the {\bf first Chebyshev function},\index{first Chebyshev function $\vartheta(x)$} \index[symbols]{.s C@$\vartheta(x)$}   which is the function defined by $$\vartheta(x) = \sum_{p \leq x} \log p$$ for all $x \geq 0$.  The function $\vartheta(x)$ is the summatory function $S_{\chi_{\pp} \cdot \log}(x)$ of the arithmetic function $\chi_{\pp} \cdot \log$ and is a weighted prime counting function that weights each prime $p$ by $\log p$.
The following proposition, which, like Proposition \ref{psthm}, follows from Abel's summation formula,  reveals  important and well-known connections  between the functions $\vartheta$ and $\pi$.

\begin{proposition}\label{pitheta}
Let $x> 0$.  One has
$$\vartheta(x) = \pi(x) \log x -\int_0^x \frac{\pi(t)}{t} \, dt $$
\begin{align*}
\li(x)-\pi(x) -\frac{x-\vartheta(x)}{\log x}= \frac{1}{\log x}\int_0^x \frac{\li(t)-\pi(t)}{t} \, dt,
\end{align*}
where the Cauchy principal value of the latter integral is assumed.  One also has
$$\pi(x) = \frac{\vartheta(x)}{\log x} + \int_\mu^x \frac{\vartheta(t)}{t \log^2 t} \, dt$$
\begin{align*}
\li(x)-\pi(x) -\frac{x-\vartheta(x)}{\log x}= \li(N)-\pi(N) -\frac{N-\vartheta(N)}{\log N}+   \int_N^x \frac{t-\vartheta(t)}{t \log^2 t} \, dt
\end{align*}
for all $N > 1$.
\end{proposition}

\begin{corollary}\label{pitheta2}
One has
$$\vartheta(x) = \pi(x) \log x + O \left( \frac{x}{\log x} \right) \ (x \to \infty)$$
and therefore
$$\vartheta(x) \sim \pi(x) \log x \ (x \to \infty).$$
Consequently, the prime number theorem is equivalent to
$$\vartheta(x) \sim x \ (x \to \infty).$$
\end{corollary}

\begin{proof}
By  the proposition and Theorem \ref{chebasymp}, one has
\begin{align*}
\pi(x) \log x -\vartheta(x)  = \int_0^x \frac{\pi(t)}{t} \, dt   = O\left(  \int_0^x \frac{dt}{\log t}  \right)  =   O\left( \frac{x}{\log x}\right) = O(\pi(x)) \ (x \to \infty).
\end{align*}
The corollary follows.
\end{proof}

Let  $\Lambda(n)$ be the {\bf von Mangoldt function},\index{von Mangoldt function $\Lambda(n)$}\index[symbols]{.rt  E@$\Lambda(n)$}   which by definition  is given by
$$\Lambda(n) =  \begin{cases} \log p & \quad \text{if } n > 1 \text{ is a power of some prime } p \\
0 &  \quad \text{otherwise}.
\end{cases}$$
Equivalently, one defines $\Lambda = \widecheck{\log} = \mu*\log$.
The summatory function of the arithmetic function $\Lambda(n)$ is the {\bf second Chebyshev function}\index{second Chebyshev function $\psi(x)$} \index[symbols]{.s D@$\psi(x)$}  $\psi(x)$, given by $$\psi(x) =S_{\Lambda}(x) =  \sum_{k = 1}^\infty \sum_{p^k \leq x} \log p =  \sum_{k = 1}^\infty \vartheta(x^{1/k})$$ for all $x \geq 0$.  Thus, $\psi(x)$ is a weighted prime power counting function that weights each  prime power $p^n$ by $\log p$.    Since $\vartheta(x) = \psi(x) = 0$ if $x < 2$ and $x^{1/n} < 2$ if $n > \log_2 x$, one has
$$\psi(x) = \sum_{1 \leq n \leq  \log_2 x} \vartheta(x^{1/n}), \quad \forall x > 0.$$
By M\"obius inversion, then, one has
$$\vartheta(x) =  \sum_{1 \leq n \leq  \log_2 x} \mu(n) \psi(x^{1/n}) = \sum_{n = 1}^\infty \mu(n) \psi(x^{1/n}), \quad \forall x > 0.$$
The following is an analogue of Corollary \ref{pitheta2} for $\psi(x)$.

\begin{proposition}\label{pitheta2b}
Let $x \geq 2$ and $L(x) = \lfloor \log_2 x \rfloor -1$.
\begin{enumerate}
\item One has
$$\vartheta(x^{1/2}) \leq  \psi(x)-\vartheta(x) \leq \vartheta(x^{1/2}) + L(x) \vartheta(x^{1/3})$$
$$\psi(x^{1/2}) \leq  \psi(x)-\vartheta(x) \leq \psi(x^{1/2}) + L(x) \psi(x^{1/3}).$$
\item One has $$ \psi(x)-\vartheta(x) = O( \sqrt{x} ) \ (x \to \infty)$$
and therefore
$$\psi(x) \sim \vartheta(x) \ (x \to \infty).$$
\item The prime number theorem is equivalent to
$$\psi(x) \sim x \ (x \to \infty).$$
\end{enumerate}
\end{proposition}

Let $\Pi(x)$ denote the {\bf Riemann prime counting function},\index{Riemann prime counting function $\Pi(x)$}  \index[symbols]{.s G@$\Pi(x)$}    defined by
$$\Pi(x) = \sum_{n = 1}^\infty \sum_{p^n \leq x} \frac{1}{n} = \sum_{n = 1}^\infty \frac{1}{n}\pi(x^{1/n}).$$
The function $\Pi(x)$ is a weighted prime power counting function that weights each prime power $p^n$ by $\frac{1}{n}$.   Since $\pi(x) = \Pi(x) = 0$ if $x < 2$, and $\sqrt[n]{x} < 2$ if $n > \log_2 x$, one has
\begin{align}\label{Pi2}
\Pi(x) = \sum_{n \leq \log_2 x} \frac{1}{n}\pi(\sqrt[n]{x}), \quad \forall x > 0.
\end{align}
By M\"obius inversion, one has
$$\pi(x) = \sum_{n \leq \log_2 x} \frac{ \mu(n)}{n} \Pi(\sqrt[n]{x}) = \sum_{n=1}^\infty \frac{ \mu(n)}{n} \Pi(\sqrt[n]{x}), \quad \forall x > 0.$$

\begin{proposition}\label{pitheta2c}
One has
$$ \Pi(x)-\pi(x) = O\left (\frac{\sqrt{x}}{\log x} \right) \ (x \to \infty)$$
and therefore
$$\Pi(x) \sim \pi(x) \ (x \to \infty).$$
Consequently, the prime number theorem is equivalent to
$$\Pi(x) \sim \frac{x}{\log x} \ (x \to \infty).$$
\end{proposition}

\begin{lemma}\label{RAlem}
One has
$$\pi(x) = o(\pi(x^t) ) \ (x \to \infty)$$
for all $t > 1$.
\end{lemma}

\begin{proof}
This follows immediately from Theorem \ref{chebasymp}.
\end{proof}

The following result provides  various asymptotic relations between the weighted prime and prime power counting functions discussed in this section.

\begin{proposition}\label{RAprop2}
One has the following asymptotic expansions.
\begin{enumerate}
\item  $\displaystyle \Pi(x) \simeq \sum_{n = 1}^\infty \frac{1}{n}\pi(\sqrt[n]{x})  \ (x \to \infty)$.
\item $\displaystyle \pi(x) \simeq \sum_{n = 1}^\infty \frac{\mu(n)}{n}\Pi(\sqrt[n]{x})  \ (x \to \infty)$.
\item  $\displaystyle \psi(x) \simeq \sum_{n = 1}^\infty \vartheta(x^{1/n})  \ (x \to \infty)$.
\item $\displaystyle \vartheta(x) \simeq  \sum_{n = 1}^\infty \mu(n) \psi(x^{1/n})\ (x \to \infty)$.
\end{enumerate}
\end{proposition}

\begin{proof}  By (\ref{Pi2}), for any positive integer $N$, one has $$\frac{1}{N}\pi(x^{1/N}) \leq  \Pi(x)-\sum_{k = 1}^{N-1} \frac{1}{n}\pi(x^{1/n}) \leq \frac{1}{N}\pi(x^{1/N}) + \frac{1}{N+1}(\log_2 x) \pi(x^{1/(N+1)})$$
for all $x > 2^N$, and therefore
$$1 \leq \frac{ \Pi(x)-\sum_{n = 1}^{N-1} \frac{1}{n}\pi(x^{1/n})}{\frac{1}{N}\pi(x^{1/N})} \leq 1  + \frac{\frac{1}{N+1}(\log_2 x )\pi(x^{1/(N+1)})}{\frac{1}{N}\pi(x^{1/N})} \to 1$$
as $x \to \infty$, by Lemma \ref{RAlem}.  It follows that
$$\lim_{x \to \infty} \frac{ \Pi(x)-\sum_{n = 1}^{N-1} \frac{1}{n}\pi(x^{1/n})}{\frac{1}{N}\pi(x^{1/N})} = 1.$$
This proves statement (1), and the other three statements are proved in like fashion.
\end{proof}

The prime number theorem in a stronger form  yields, via Abel's summation formula, the following.

\begin{proposition}\label{mert1th}
Assume the prime number theorem in the stronger form
$$\vartheta(x) = x + O \left(\frac{x}{(\log x)^t} \right) \ (x  \to \infty),$$
for some $t > 1$.  One has
$$\sum_{p \leq x} \frac{\log p}{p} -\log x = \frac{\vartheta(x)}{x}-\int_1^x \frac{t-\vartheta(t)}{t^2}\, dt = -B + o(1) \ (x \to \infty)$$
for some constant $B$, where
$$B = \lim_{x\to \infty}\left(\log x -\sum_{p \leq x} \frac{\log p}{p}\right)  = -1+\int_1^\infty \frac{t-\vartheta(t)}{t^2}\, dt = \int_1^\infty \frac{t-1-\vartheta(t)}{t^2}\, dt.$$
\end{proposition}

Note that $B= 1.332582275733\ldots$.

\begin{remark}[Equivalents of the prime number theorem]
\cite[pp.\ 12--13]{ing2} provides a simple proof that the three functions $\frac{\pi(x)}{\frac{x}{\log x}}$, $\frac{\psi(x)}{x}$, and $\frac{\vartheta(x)}{x}$ all have the same lim sup as $x \to \infty$, all at most $4 \log 2$, and the same lim inf as $x \to \infty$, all at least $\log 2$.  \cite[Theorem 6]{ing2} proves more, namely, that the lim sup is at least $1$ and the lim inf is at most $1$.  It follows that, if the limit of any of the three functions exists as $x \to \infty$, then all three limits  must exist and be equal to $1$.  These results are substantially easier to prove than the prime number theorem.
\end{remark}

\section{Average value and average order}

An arithmetic function $f$ is said to have {\bf average value}, or {\bf mean value}, $c \in \CC$\index{average value}\index{mean value} if
$$\lim_{x \to \infty} \frac{1}{x} \sum_{n \leq x} f(n) = c,$$
or, equivalently, if
$$\lim_{N \to \infty} \frac{1}{N} \sum_{n =1}^N f(n) = c.$$

\begin{example}\label{sumex0} \
\begin{enumerate}
\item  An arithmetic function $f$  has mean value $0$ if and only if $S_f(x) = o(x) \ (x \to \infty)$.  For example, since $M(x) = o(x) \ (x \to \infty)$, where $M = S_\mu$ is the Mertens function, the M\"obius function $\mu$ has average value $0$.
\item Consider the number $$S_{|\mu|}(x) = \sum_{n \leq x} |\mu(n)|$$ of squarefree positive integers less than or equal to $x$.   It is well known \cite[Theorem 2.2]{mont} that
\begin{align}\label{Qbound}
Q(x) = O(x^{1/2}) \ (x \to \infty),
\end{align}
where $$Q(x) = S_{|\mu|}(x) -  \frac{x}{\zeta(2)},$$
and where $\zeta(2) = \frac{\pi^2}{6}$.  It follows that
$$\lim_{x \to \infty} \frac{1}{x}\sum_{n \leq x} |\mu(n)| = \frac{6}{\pi^2},$$
that is, the function $|\mu(n)|$ has average value $\frac{6}{\pi^2}$. Thus,  the asymptotic density of the set of all squarefree numbers in the positive integers is equal to  $\frac{6}{\pi^2}$.
\item The multiplicative arithmetic function
$$\rho(n) = \frac{\phi(n)}{n} = \prod_{p |n} \left(1-\frac{1}{p} \right),$$
where $\rho(n)$ for any positive integer $n$ is equal to the probability that a randomly chosen integer from $1$ to $n$ is relatively prime to $n$, satisfies
\begin{align}\label{rhobound}
S_\rho(x) = \frac{6}{\pi^2}x + O(\log x) \ (x \to \infty)
\end{align}
\cite[Theorem 2.1]{mont}.  Therefore, like the function $|\mu|$, the function $\rho = \frac{\phi}{\id}$ has average value $\frac{6}{\pi^2}$.
\end{enumerate}
\end{example}

Let $f$ and $g$ be arithmetic functions.  The function $f$ is said to have {\bf average order $g$}\index{average order} if
$$S_f(x) \sim S_g(x) \ (x \to \infty),$$ or, equivalently, if
$$\frac{1}{x} \sum_{n \leq x} f(n) \sim \frac{1}{x} \sum_{n \leq x} g(n) \ (x \to \infty),$$ or, equivalently still, if
$$\frac{1}{N} \sum_{n = 1}^N f(n) \sim \frac{1}{N} \sum_{n = 1}^N g(n) \ (N \to \infty).$$  For example, $f$ has average value $c \neq 0$ if and only if $f$ has average order $c \neq 0$.   Note that the relation ``$f$ has average order $g$'' is an equivalence relation on the set of all arithmetic functions.   In the case where $f$ is real-valued, one often seeks an approximating function $g: \RR_{\geq 1} \to \RR$ that is continuous and monotone.

\begin{example}[{[278] [91]}]\label{sumex} \
\begin{enumerate}
\item Using what we now call the  {\it Dirichlet hyperbola method}, described later in this section, Dirichlet proved that
\begin{align}\label{Sdbound}
S_d(x) = x \log x + (2 \gamma-1)x + O(\sqrt{x}) \ (x \to \infty),
\end{align}
where $d$ denotes the divisor function.
$$\sum_{n\leq x}\log n=x\log x-x+O(\log x) \sim \sum_{n \leq x} d(n) \ (x \to \infty),$$
it follows that the arithmetic function $d(n)$ has average order $\log n$.
\item The arithmetic function $2^\omega$ at $n$ equals the number $\sum_{d|n} |\mu(d)|$ of squarefree divisors of $n$ for all $n$.  Mertens proved that
$$S_{2^\omega} (x) = \frac{1}{\zeta(2)}x \log x + \left(\frac{2\gamma-1}{\zeta(2)}- \frac{2\zeta'(2)}{\zeta^2(2)}\right) x+O(x^{1/2}\log x) \ (x \to \infty).$$
It follows that the arithmetic function $2^\omega$ has average order $\frac{1}{\zeta(2)} \log n$.
\item
The summatory function of the additive arithmetic function $\omega$ satisfies
\begin{align}\label{Somegabound}
S_\omega(x) = x \log \log x + M x + O\left(\frac{x}{\log x} \right) \ (x \to \infty),
\end{align}
where $M$ is the Meissel--Mertens constant,
and, since $\log \log$ is slowly varying, by Corollary \ref{karcor} one has $S_{\log \log}(x) \sim x \log \log x \ (x \to \infty)$, and therefore $\omega$ has average order $\log \log n$.    More generally, one has the asymptotic expansions
$${\frac {1}{x}}S_\omega(x) \simeq \log \log x+M+\sum_{n = 0}^\infty \left(\sum_{k=0}^{n}{\frac {\gamma_{k}}{k!}}-1\right){\frac {n!}{(\log x)^{n+1}}} \ (x \to \infty)$$
$${\frac {1}{x}}S_\Omega(x) \simeq \log \log x+K+\sum_{n = 0}^\infty \left(\sum_{k=0}^{n}{\frac {\gamma_{k}}{k!}}-1\right){\frac {n!}{(\log x)^{n+1}}} \ (x \to \infty),$$
where the $\gamma_k$ are the Stieltjes constants, and where
$$K = M + \sum_p \frac{1}{p(p-1)}  = \gamma+\sum_{n = 2}^\infty  \left(1-\frac{1}{n} \right)P(n) =1.034653881897\ldots$$
\cite[Section 1.4.3]{finch}.   It follows that the arithmetic function $\Omega$ has average order $\log \log n$ and the arithmetic function $\Omega-\omega \geq 0$ has average value $$K-M = \sum_p \frac{1}{p(p-1)} = 0.773156669049\ldots$$
\end{enumerate}
\end{example}

Now we present a few known techniques for verifying some of  the examples above.

\begin{proposition}[{\cite[pp.\ 35--36]{mont} \cite[Theorem 6.13]{kon}}]\label{montprop}
Let $f$ be an arithmetic function.    For all $ x \geq 0$, one has
\begin{align*}
S_{\widehat{f}}(x) = \sum_{n \leq x} f(n)\left\lfloor \frac{x}{n} \right \rfloor =  x\sum_{n \leq x} \frac{f(n)}{n} -  \sum_{n \leq x} f(n)\left\{ \frac{x}{n} \right \} = x\sum_{n \leq x} \frac{f(n)}{n} + O\left( S_{|f|}(x) \right)  \ (x \to \infty).
\end{align*}
Consequently, one has  $S_{\widehat{f}} = f * \lfloor - \rfloor$, and, if
$$S_{|f|}(x) = o\left( x\sum_{n \leq x} \frac{f(n)}{n}\right) \ (x \to \infty),$$
\begin{align*}
S_{\widehat{f}}(x) \sim x\sum_{n \leq x} \frac{f(n)}{n} \ (x \to \infty).
\end{align*}
Moreover, if the sum $s = \sum_{n = 1}^\infty \frac{f(n)}{n}$ converges and $S_{|f|}(x) = o(x) \ (x \to \infty)$, which both hold if the sum  $s = \sum_{n = 1}^\infty \frac{f(n)}{n}$ converges absolutely, then  the arithmetic function
${\widehat{f}}$ has average value $s$.
\end{proposition}

\begin{proof}
Since $\lfloor x \rfloor = x + O(1) \ (x \to \infty)$, one has
\begin{align*}
S_{\widehat{f}}(x)  & = \sum_{k \leq x} \sum_{n|k} f(n)  \\
& = \sum_{n \leq x} f(n) \sum_{k\leq x, \, n|k} 1 \\
& = \sum_{n \leq x} f(n)\left\lfloor \frac{x}{n} \right \rfloor \\
& =  x\sum_{n \leq x} \frac{f(n)}{n} -  \sum_{n \leq x} f(n)\left\{ \frac{x}{n} \right \}  \\
& = x\sum_{n \leq x} \frac{f(n)}{n} + O\left( \sum_{n \leq x} |f(n)| \right)  \ (x \to \infty).
\end{align*}
Moreover,  if the sum $s = \sum_{n = 1}^\infty \frac{f(n)}{n}$ converges absolutely, then one has
\begin{align*}
\sum_{n \leq x} |f(n)| & = \sum_{n \leq \sqrt{x}}n\frac{|f(n)|}{n} + \sum_{\sqrt{x}< n \leq x }n\frac{|f(n)|}{n} \\
& \leq \sqrt{x}\sum_{n \leq \sqrt{x}}\frac{|f(n)|}{n}  + x  \sum_{\sqrt{x}< n \leq x }\frac{|f(n)|}{n} \\
& = O(\sqrt{x}) + o(x) \\
& = o(x) \ (x \to \infty).
\end{align*}
This completes the proof.
\end{proof}

Proposition \ref{montprop} is easily seen to yield (\ref{Qbound}), (\ref{rhobound}), and even (\ref{Somegabound}).    (See, for example, \cite[Theorems 2.1 and 2.2]{mont}).)  Applied to the arithmetic function $f = \zeta$, the proposition yields
\begin{align*}
S_{d}(x) & = \sum_{n \leq x} \left\lfloor \frac{x}{n} \right \rfloor = xH_{\lfloor x \rfloor} + O\left( {\lfloor x \rfloor} \right)   = x\log x+O(x) \ (x \to \infty) \ (x \to \infty),
\end{align*}
which implies  (\ref{Sdbound})  for $t = 1$  but  is too crude an estimate to yield (\ref{Sdbound}) for any $t < 1$.  For this purpose, one can use the following result, known as the {\bf Dirichlet hyperbola method},\index{Dirichlet hyperbola method} which has a simple verification \cite[p.\ 37]{mont}.

\begin{proposition}[{Dirichlet hyperbola method  \cite[p.\ 37]{mont}}]\label{hyperbola}
Let $f$ and $g$ be arithmetic functions.  For all $x, y \in \RR$ with $0 < y \leq x$, one has
$$S_{f*g}(x) = \sum_{n \leq y} f(n) S_g\left( \frac{x}{n} \right) + \sum_{n \leq \frac{x}{y}} g(n) S_f\left( \frac{x}{n} \right)-S_f(y)S_g\left( \frac{x}{y} \right).$$
\end{proposition}

Applying the Dirichlet hyperbola method to $f = g = \zeta$, we obtain
$$S_d(x) = \sum_{n \leq y}\left\lfloor  \frac{x}{n} \right \rfloor + \sum_{n \leq \frac{x}{y}}  \left\lfloor \frac{x}{n} \right\rfloor-\lfloor y \rfloor \left\lfloor \frac{x}{y} \right \rfloor.$$
The first term is
$$\sum_{n \leq y}\left\lfloor  \frac{x}{n} \right \rfloor  = x H_{\lfloor y \rfloor} + O(y)  = x \log y + \gamma x + O\left(\frac{x}{y}+y \right),$$
and the error bound is minimized by taking  $y =  \sqrt{x}$.  Since $\lfloor \sqrt{x} \rfloor^2 = x+ O( \sqrt{x} ) \ (x \to \infty)$, for this choice of $y$ one has
\begin{align*}
S_d(x) & = 2\sum_{n \leq \sqrt{x}}\left\lfloor  \frac{x}{n} \right \rfloor -\lfloor \sqrt{x} \rfloor^2 \\
& =  2(x \log \sqrt{x} + \gamma x ) + O( \sqrt{x} ) -x + O( \sqrt{x} ) \\
& = x \log x  + (2 \gamma - 1) x + O( \sqrt{x} ) \ (x \to \infty),
\end{align*}
thus yielding Dirichlet's result.

The asymptotic relation (\ref{Somegabound}) for $S_\omega$ follows  from Proposition \ref{montprop}, applied to $f = \chi_{\pp}$ and $g = \zeta$:
\begin{align*}
S_\omega(x)  & = \sum_{p \leq x} \left \lfloor \frac{x}{p}\right \rfloor  \\
& = x\sum_{p \leq x} \frac{1}{p} -\sum_{p \leq x} \left\{\frac{x}{p}\right \} \\
&  = x\sum_{p \leq x} \frac{1}{p} + O(\pi(x)) \\
& = x \left (\log \log x + M + O\left( \frac{1}{\log x}\right) \right) + O(\pi(x)) \\
& = x \log \log x + M x +   O\left( \frac{x}{\log x}\right) \ (x \to \infty),
\end{align*}
where the penultimate equation follows from Mertens' second theorem and the last equation follows from Chebyshev's result that $\pi(x)  = O \left (\frac{x}{\log x} \right) \ (x \to \infty)$ (and thus the proof does not require the full strength of the prime number theorem).  It is interesting to observe that $S_\omega(x) = \sum_{p \leq x}  \lfloor \frac{x}{p}  \rfloor$, while
$S_d(x) =  \sum_{n \leq x}\lfloor \frac{x}{n} \rfloor$, and thus the $O$ bound (\ref{Somegabound}) for $S_\omega$ is a ``primes'' analogue of Dirichlet's $O$ bound (\ref{Sdbound}) for $S_d$.  The result for $S_\omega$ generalizes as follows.

\begin{proposition}[{\cite[Theorem 6.19]{kon}}]\label{erdd}
Let $f$ be a real-valued additive arithmetic function such that $f(p) = 1$ for all primes $p$ and $f(p^{n}) -f(p^{n-1})$ is uniformly bounded for all primes $p$ and all  positive integers $n$.  Then one has
$$S_f(x) = x \log \log x +(M+ C_f)x + O\left (\frac{x}{\log x} \right) \ (x \to \infty),$$
where $C_f$ is the constant
$$C_f = \sum_{n = 2}^\infty \sum_p \frac{f(p^n)-f(p^{n-1})}{p^n}.$$
\end{proposition}

For example,  the proposition applies to both $f = \omega$ and $f= \Omega$, where $C_\omega = 0$ and $C_\Omega$ is given by
$$C_\Omega =   \sum_{n = 2}^\infty \sum_p \frac{1}{p^n} =     \sum_p \sum_{n = 2}^\infty \frac{1}{p^n} =  \sum_p \frac{1}{p(p-1)},$$
thus yielding (\ref{Somegabound}) and
\begin{align*}
S_\Omega(x) = x \log \log x + (M +C_\Omega)x + O\left(\frac{x}{\log x} \right) \ (x \to \infty).
\end{align*}

\begin{remark}[Probabilistic number theory]\label{prnt}
{\it Probabilistic number theory} was founded  in the 1930s by Erd\H{o}s, Wintner, and Kac.  One of its key ideas is that the prime numbers can be treated as independent random variables.  The  {\bf Erd\H{o}s--Kac theorem},\index{Erd\H{o}s--Kac theorem} also known as the {\bf fundamental theorem of probabilistic number theory},\index{fundamental theorem of probabilistic number theory}   states that, for any strongly additive real-valued arithmetic function $f$ with $|f(p)| \leq 1$ for all primes $p$, and for all real numbers $a \leq b$, one has
$$\lim_{{x\rightarrow \infty }}\left({\frac  {1}{x}}\cdot \#\left\{n\leq x:a\leq {\frac  {f(n)-A(n)}{B(n)}}\leq b\right\}\right)=\Phi (a,b),$$
$$A(n)=\sum_{{p\leq n}}{\frac  {f(p)}{p}},\qquad B(n)={\sqrt  {\sum_{{p\leq n}}{\frac  {f(p)^{2}}{p}}}},$$
and where $\Phi(a,b)$ is the normal distribution
$$\Phi(a,b)= \frac{1}{\sqrt{2\pi}}\int_a^b e^{-t^2/2} \, dt$$
with mean $0$ and standard deviation $1$ [77].    From this result it follows that
$$\lim_{x \rightarrow \infty}  \left ( \frac {1}{x} \cdot \#\left\{ n \leq x : a \le \frac{\omega(n) - \log \log n}{\sqrt{\log \log n}} \le b \right\} \right ) = \Phi(a,b)$$
for all real numbers $a \leq b$.
\end{remark}

\section{Dirichlet series}

Along with forming its summatory function, a natural way to ``analysis-ize'' an arithmetic function $f$ is to form the {\bf Dirichlet series $D_f(s)$ of $f$},\index{Dirichlet series $D_f(s)$}\index[symbols]{.l E@$D_f(s)$}    which is the complex function defined by
$$D_f(s) = \sum_{n = 1}^\infty \frac{f(n)}{n^s}$$
for all $s \in \CC$ (which may or may not coverge for a given $s \in \CC$).  The Dirichlet series of $f$ is obtained from the formal Dirichlet series $D_f(X)$ of $f$ by ``substituting'' a complex variable $s$ for the formal ``variable'' $X$, i.e., by substituting $n^{-s}$ for the monomial $n^{-X} \in \operatorname{Dir}_\CC$.

\begin{example}\label{direx} \
\begin{enumerate}
\item The Dirichlet series of the arithmetic function $\zeta(n) = 1$ converges precisely on the set $\{s \in \CC: \operatorname{Re} s > 1\}$, and on that domain one has
$$D_{\zeta} (s) = \zeta(s)= \sum_{n = 1}^\infty \frac{1}{n^s}.$$
\item The Dirichlet series of the arithmetic function $\frac{1}{\id}$ converges precisely on the set $\{s \in \CC: \operatorname{Re} s > 0\}$, and on that domain one has
$$D_{\frac{1}{\id}} (s) = \zeta(s+1)= \sum_{n = 1}^\infty \frac{1}{n^{s+1}}.$$    More generally, for any $a \in \CC$,
the Dirichlet series of the arithmetic function $\id^a$ converges precisely on the set $\{s \in \CC: \operatorname{Re} s > 1+\operatorname{Re} a\}$, and on that domain one has
$$D_{\id^a} (s) = \zeta(s-a)= \sum_{n = 1}^\infty \frac{1}{n^{s-a}}.$$
\item The Dirichlet series  $$D_{\chi_{\pp}} (s) = P(s)= \sum_{p}^\infty \frac{1}{p^s}$$  of the characteristic function $\chi_{\pp}$ of the set $\pp$ of all prime numbers is the {\bf prime zeta function} $P(s)$, and\index{prime zeta function $P(s)$}\index[symbols]{.t  B@$P(s)$}   it converges precisely on the set $\{s \in \CC: \operatorname{Re} s > 1\}$.
\end{enumerate}
\end{example}

As  was first proved by Riemann in [248] and is now well known, the Dirichlet series $\zeta(s) = D_{\zeta} (s)$ on $\{s \in \CC: \operatorname{Re} s> 1\}$ extends to a meromorphic function on all of $\CC$ possessing a single pole, namely, a simple pole at $s = 1$ with residue $1 = \lim_{s \to 1} (s-1) \zeta(s)$.   The meromorphic continuation of $D_{\zeta} (s)$ is also denoted $\zeta(s)$ and is called the {\bf Riemann zeta function}.\index{Riemann zeta function $\zeta(s)$}
It is well known \cite[Theorem 1.3]{ivic} that the Stieltjes constants $\gamma_k$, as defined in Example \ref{stiec}(2), are  the real constants occurring in the Laurent expansion
\begin{align}\label{stcon}
\zeta (s)={\frac {1}{s-1}}+\sum_{k=0}^{\infty }{\frac {(-1)^{k}\gamma_k }{k!}}(s-1)^{k}
\end{align}
of $\zeta(s)$ at $1$.   In particular, one has
$$\gamma = \lim_{s \to 1} \left( \zeta(s)-\frac{1}{s-1}\right).$$  See Section 4.2 for a survey of results on the Riemann zeta function.   Many treatises are devoted to the topic, e.g.,  [70] [141] [230] [280].

\begin{proposition}[{\cite[pp.\ 9--10]{flaj}}]\label{flajprop}
Let $F(x)$ be a complex-valued function that is  bounded and Riemann integrable on $[1,x]$ for all $x > 1$, with $\deg F = \sigma < \infty$, and let
$$G(s) = \int_1^\infty \frac{ F(x)}{x^{s+1}} \,dx.$$
Then $G(s)$ is analytic in the right half plane $\{s \in \CC: \operatorname{Re} s > \sigma\}$, and one has
$$\frac{d}{ds} G(s) = -\int_1^\infty \frac{ F(x)\log x}{x^{s+1}} \,dx$$
for all $s$ in the given right half plane.
\end{proposition}

The equation for $\frac{d}{ds} G(s)$ in the proposition states that  $\frac{d}{ds} G(s)$ can be obtained from $G(s) = \int_1^\infty \frac{ F(x)}{x^{s+1}} \,dx$ by differentiating the integrand with respect to $s$.  Note that \cite[pp.\ 9--10]{flaj} generalizes the proposition to    complex-valued functions $F(s)$ that are Lebesgue integrable on all compact subsets of $[1,\infty)$.

Let $f$ be an arithmetic function,  let $s \in \CC$,  and let $N$ be a positive integer.   Applying Abel's summation formula to $\alpha(x) = x^{-s}$, we see that
\begin{align}\label{abelrem}
\sum_{n = 1}^N \frac{f(n)}{n^s}  = \frac{S_f(N)}{N^{s}}+s\int_1^N \frac{S_f(x)}{ x^{s+1}}\, dx.
\end{align}
This forms the basis for proofs of Theorem \ref{dirichlet} below.  The theorem,  which is of fundamental importance to analytic number theory, shows that the summatory function $S_f(x)$ and the Dirichlet series $D_f(s)$ of  an arithmetic function $f$ are  intimately related to one another.  We have replaced the limits superior in the traditional formulations of the result with degrees, as appropriate.    For any arithmetic function $f$,  the extended real number $\sigma_{\mathrm{c}}(f)$ provided by the theorem---namely,  the unique extended real number for which the Dirichlet series $D_f(s)$ converges for $\operatorname{Re}s > \sigma_{\mathrm{c}}(f)$ and diverges for $\operatorname{Re} s < \sigma_{\mathrm{c}}(f)$---is called
the {\bf abscissa of convergence of $D_f(s)$}.\index{abscissa of convergence $\sigma_{\mathrm{c}}(f)$}\index[symbols]{.l F@$\sigma_{\mathrm{c}}(f)$}   Likewise, the extended real number $\sigma_{\mathrm{a}}(f)$ provided by the theorem is called the {\bf abscissa of absolute convergence of $D_f(s)$}.\index[symbols]{.l Fa@$\sigma_{\mathrm{a}}(f)$}\index{abscissa of absolute convergence $\sigma_{\mathrm{a}}(f)$}

\begin{theorem}[{\cite[Theorem 1.3]{mont} \cite[Chapter II Sections 3 and 4]{widd}}]\label{dirichlet}
Let $f: \ZZ_{> 0} \longrightarrow \CC$ be an arithmetic function.
\begin{enumerate}
\item There exists a unique $\sigma_{\mathrm{c}}  = \sigma_{\mathrm{c}}(f) \in \overline{\RR}$ such that  the series $\sum_{n =1}^\infty f(n)n^{-s}$ converges for $\operatorname{Re}s > \sigma_{\mathrm{c}}$ and diverges for $\operatorname{Re} s < \sigma_{\mathrm{c}}$.
\item If $D_f(0) = \sum_{n = 1}^\infty f(n)$ is divergent, then
$$\sigma_{\mathrm{c}} = \deg S_f \geq 0.$$
\item If $D_f(0) = \sum_{n = 1}^\infty f(n)$ is convergent, then
$$\sigma_{\mathrm{c}} = \deg (D_f(0)-S_f) \leq 0,$$
where $D_f(0) -S_f(x) = \sum_{n > x} f(n)$ for all $x \geq 0$.
\item One has
\begin{align*}
{D_f(s)} = s\int_1^\infty  \frac{S_f(x)}{x^{s+1}} \,dx
\end{align*}
for all $s \in \CC$ with $\operatorname{Re} s > \max(\sigma_{\mathrm{c}},0)$.
\item If $S_f(x)$ is bounded, then $\sigma_{\mathrm{c}} \leq 0$.
\item If $\sigma_{\mathrm{c}} < 0$, then $S_f(x)$ is bounded.
\item There exists a unique $\sigma_{\mathrm{a}} = \sigma_{\mathrm{a}}(f)  \in \overline{\RR}$ such that  the series $\sum_{n =1}^\infty f(n)n^{-s}$ converges absolutely if $\operatorname{Re}s > \sigma_{\mathrm{a}}$ but does not converge absolutely if $\operatorname{Re} s < \sigma_{\mathrm{a}}$.
\item One has $$\sigma_{\mathrm{c}} \leq \sigma_{\mathrm{a}} \leq \sigma_{\mathrm{c}} + 1.$$
\item If $\sigma_{\mathrm{c}} = \sigma_{\mathrm{a}}$, then both are equal to $1+\deg f$.
\item If $f(n) \in \RR_{\geq 0}$ for all sufficiently large $n$, then $\sigma_{\mathrm{c}} = \sigma_{\mathrm{a}} = 1+\deg f$.
\item $D_f(s)$ is analytic on $\{s \in \CC: \operatorname{Re} s > \sigma_{\mathrm{c}}\}$, the Dirichlet series $\sum_{n = 1}^\infty \frac{f(n)\log n}{n^s}$ has the same abscissa of convergence and abscissa of absolute convergence as $D_f(s)$, and one has
$$\frac{d}{ds} D_f(s) = -\sum_{n = 1}^\infty \frac{f(n)\log n}{n^s}$$
for all $s$ for which the given series on the right converges.
\end{enumerate}
\end{theorem}

See \cite[Chapter II]{widd} for a generalization of the theorem to {\it Laplace--Stieltjes transforms}, which generalize both  Dirichlet series and Laplace transforms.

The following useful result relates Dirichlet series with the operation of Dirichlet convolution.

\begin{proposition}[{\cite[Theorem 11.5]{apos} \cite[Theorem 6.9]{kon}}]\label{Dconjprop}
Let $f$ and $g$ be arithmetic functions.  For all $s \in \CC$, if $D_f(s)$  and $D_g(s)$ are absolutely convergent, then $D_{f*g}(s)$ is absolutely converent and
$$D_{f*g}(s) = D_f(s) D_g(s).$$
In particular, one has
$$\sigma_{\mathrm{a}}(f*g) \leq \max(\sigma_{\mathrm{a}}(f),\sigma_{\mathrm{a}}(g)).$$
\end{proposition}

\begin{example}
For all $s, a \in \CC$, one has
$$D_\phi(s) = \frac{\zeta(s-1)}{\zeta(s)}$$
if $\operatorname{Re} s >2$
$$D_{\sigma_a}(s) = \zeta(s) \zeta(s-a)$$
if  $\operatorname{Re} s > 1+\operatorname{Re} a$.
\end{example}

\begin{example}
Let $f$ be the arithmetic function with $f(1) =1$ and $f(2) = -1$, and $f(n) = 0$ for all $n \geq 3$.   Then
$D_f(s) = 1-2^{-s}$ is absolutely convergent for all $s \in \CC$, so that $\sigma_{\mathrm{c}}(f) = \sigma_{\mathrm{a}}(f)  = -\infty$.  On the other hand,
$D_{f^{*-1}}(s) = \frac{1}{1-2^{-s}}$ converges, and converges absolutely, precisely for all $s \in \CC$ with $\operatorname{Re} s > 0$, so that $\sigma_{\mathrm{c}}(f^{*-1}) = \sigma_{\mathrm{a}}(f^{*-1}) = 0$.
\end{example}

Below are applications of Theorem \ref{dirichlet} and Proposition \ref{Dconjprop} to  seven important arithmetic functions and their corresponding Dirichlet series.

\begin{example}\label{direxample}  \
\begin{enumerate}
\item Since $S_\zeta(x) = {\lfloor x \rfloor}$ and $D_\zeta(s) = \zeta(s)$, one has
$${\zeta(s)} = s \int_1^\infty  \frac{\lfloor x \rfloor}{x^{s+1}} \, dx$$
$$\frac{1}{s-1} =  \int_1^\infty  \frac{x}{x^{s+1}} \, dx$$
for all $s \in \CC$ with $\operatorname{Re} s > 1 = \deg \, \lfloor x \rfloor$.   It follows that
\begin{align}\label{zetaexp}
{\zeta(s)} -\frac{1}{s-1} = 1-s \int_1^\infty  \frac{\{x \}}{x^{s+1}} \, dx = s \int_1^\infty  \frac{1-\{x \}}{x^{s+1}} \, dx
\end{align}
for all $s \in \CC$ with $\operatorname{Re} s > 1$.  Moreover, the function ${\zeta(s)} -\frac{1}{s-1}$ is entire since it has limit $\gamma$ as $s \to 1$, and the two integrals above converge for all $s \in \CC$ with $\operatorname{Re} s > 0$.  By uniqueness of analytic continuation,  (\ref{zetaexp}) is valid for all such $s$.  In particular, one has
$$\gamma = 1- \int_1^\infty  \frac{\{x \}}{x^{2}} \, dx = \int_1^\infty  \frac{1-\{x \}}{x^{2}} \, dx.$$
\item Since $S_{\frac{1}{\id}}(x) = H_{\lfloor x \rfloor}$ and $D_{\frac{1}{\id}}(s) = \zeta(s+1)$, one has
$${\zeta(s+1)} = s \int_1^\infty  \frac{H_{\lfloor x \rfloor}}{x^{s+1}} \, dx,$$
for all $s \in \CC$ with $\operatorname{Re} s > 0 = \deg \, H_{\lfloor x \rfloor}$.   It follows that
$${\zeta(s)}  = \gamma+\frac{1}{s-1}+(s-1)\int_1^\infty \frac{H_{\lfloor x \rfloor}-\gamma - \log x}{x^{s}} \, dx$$
for all $s \in \CC$ with $\operatorname{Re} s > 1$.  Moreover, since
$$H_{\lfloor x \rfloor}-\gamma - \log x  = O\left( \frac{1}{x}\right) \ (x \to \infty),$$
the integral on the right converges to an analytic function on  $\{s \in \CC: \operatorname{Re} s > 0\}$, and thus the expression above for  $\zeta(s)$  is valid for all such $s$.    Taking the limit as $s \to 0^+$, we find that
$$\lim_{s \to 0^+} \int_1^\infty \frac{H_{\lfloor x \rfloor}-\gamma - \log x}{x^s} \, dx = \gamma-1-\zeta(0) = \gamma-\frac{1}{2} = 0.077215664901\ldots.$$
Moreover, one has
$$\lim_{s \to 1} \frac{\zeta(s)-\gamma-\frac{1}{s-1}}{s-1} = -\gamma_1,$$
where $\gamma = \gamma_0$  and $\gamma_1  = -0.072815845483\ldots$ are the zeroth and first Stieltjes constants.
It follows that
$$\int_1^\infty \frac{H_{\lfloor x \rfloor}-\gamma - \log x}{x} \, dx = -\gamma_1 = 0.072815845483\ldots.$$
Likewise, one has
$$\int_1^\infty \frac{H_{\lfloor x \rfloor}-\gamma - \log x}{x^2} \, dx = \zeta(2)-\gamma -1  = 0.067718401946\ldots.$$
\item Since $S_\mu(x) = M(x) = O(x) \ (x \to \infty)$ and $D_\mu(s) = \frac{1}{\zeta(s)}$, one has
$$\frac{1}{\zeta(s)} = s \int_1^\infty  \frac{M(x)}{x^{s+1}} \, dx,$$
for all $s \in \CC$ with $\operatorname{Re} s > 1$.  Taking a limit as $s \to 1^+$, we find that
$$\int_1^\infty  \frac{M(x)}{x^2} \, dx = 0.$$
It is known that  the special value
$$D_\mu(1) = \sum_{n = 1}^\infty \frac{\mu(n)}{n} = 0$$