User:Maxieds/sandbox/Divisor sum identities

The purpose of this page is to catalog new, interesting, and useful identities related to number-theoretic divisor sums, i.e., sums of an arithmetic function over the divisors of a natural number $$n$$, or equivalently the Dirichlet convolution of an arithmetic function $$f(n)$$ with one:


 * $$g(n) := \sum_{d|n} f(n).$$

These identities include applications to sums of an arithmetic function over just the proper prime divisors of $$n$$. We also define periodic variants of these divisor sums with respect to the greatest common divisor function in the form of


 * $$g_m(n) := \sum_{d|(m,n)} f(n),\ 1 \leq m \leq n$$

Well-known inversion relations that allow the function $$f(n)$$ to be expressed in terms of $$g(n)$$ are provided by the Mobius inversion formula. Naturally, some of the most interesting examples of such identities result when considering the average order summatory functions over an arithmetic function $$f(n)$$ defined as a divisor sum of another arithmetic function $$g(n)$$. For particular examples of divisor sums involving special arithmetic functions and special Dirichlet convolutions of arithmetic functions can be found on the following pages: here, here, here, here, and here.

Interchange of summation identities
The following identities are the primary motivation for creating this topics page. These identities do not appear to be well-known, or at least well-documented, and are extremely useful tools to have at hand in some applications. In what follows, we consider that $$f,g,h,u,v: \mathbb{N} \rightarrow \mathbb{C}$$ are any prescribed arithmetic functions and that $$G(x) := \sum_{n \leq x} g(n)$$ denotes the summatory function of $$g(n)$$. Note that a more common special case of the first summation below is referenced here.

\begin{align} \sum_{n=1}^x \sum_{d|n} f(n) g\left(\frac{n}{d}\right) & = \sum_{d=1}^x f(d) G\left(\left\lfloor \frac{x}{d} \right\rfloor\right) = \sum_{i=1}^x \left(\sum_{\left\lceil \frac{x+1}{i+1} \right\rceil \leq n \leq \left\lfloor \frac{x-1}{i} \right\rfloor} f(n)\right) G(i) + \sum_{d|x} G(d) f\left(\frac{x}{d}\right) \end{align} $$
 * 1) $$\sum_{n=1}^x \sum_{d|n} h(d) u\left(\frac{n}{d}\right) v(n) = \sum_{d=1}^x h(d) \left(\sum_{n=1}^{\left\lfloor \frac{x}{d} \right\rfloor} u(k) v(dk)\right) $$
 * 1) $$\sum_{d=1}^x f(d) \left(\sum_{r|(d,x)} g(r) h\left(\frac{d}{r}\right)\right) = \sum_{r|x} g(r) \left(\sum_{1 \leq d \leq x/r} h(d) f(\operatorname{gcd}(x, r)d)\right) $$
 * 2) $$\sum_{m=1}^x \left(\sum_{d|(m,x)} f(d) g\left(\frac{x}{d}\right)\right) = \sum_{d|x} f(d) g\left(\frac{x}{d}\right) \cdot \frac{x}{d} $$
 * 3) $$\sum_{m=1}^x \left(\sum_{d|(m,x)} f(d) g\left(\frac{x}{d}\right)\right) t^m = (t^x-1) \cdot \sum_{d|x} \frac{t^d f(d)}{t^d-1} g\left(\frac{x}{d}\right) $$

In general, these identities are collected from the so-called "rarities and b-sides" of both well established and semi-obscure analytic number theory notes and techniques and the papers and work of the contributors. The identities themselves are not difficult to prove and are and exercise in standard manipulations of series inversion and divisor sums. Therefore we omit their proofs here.

The convolution method
The convolution method is a general technique for estimating average order sums of the form


 * $$\sum_{n \leq x} f(n) \qquad\text{ or } \qquad \sum_{\stackrel{q \leq x}{q\text{ squarefree}}} f(q), $$

where the multiplicative function f can be written as a convolution of the form $$f(n) = (u \ast v)(n)$$ for suitable, application-defined arithmetic functions u and v. A short survey of this method can be found here.

Periodic divisor sums
An arithmetic function is periodic (mod k), or k-periodic, if $$f(n+k) = f(n)$$ for all $$n \in \mathbb{N}$$. Particular examples of k-periodic number theoretic functions are the Dirichlet characters $$f(n) = \chi(n)$$ modulo k and the greatest common divisor function $$f(n) = (n, k)$$. It is known that every k-periodic arithmetic function has a representation as a finite discrete Fourier series of the form


 * $$f(n) = \sum_{m=1}^k a_k(m) e\left(\frac{mn}{k}\right), $$

where the Fourier coefficients $$a_k(m)$$ defined by the following equation are also k-periodic:


 * $$a_k(m) = \frac{1}{k} \sum_{n=1}^k f(n) e\left(-\frac{mn}{k}\right). $$

We are interested in the following k-periodic divisor sums:


 * $$s_k(n) := \sum_{d|(n,k)} f(d) g\left(\frac{k}{d}\right) = \sum_{m=1}^k a_k(m) e\left(\frac{mn}{k}\right). $$

It is a fact that the Fourier coefficients of these divisor sum variants are given by the formula


 * $$a_k(m) = \sum_{d|(m,k)} g(d) f\left(\frac{k}{d}\right) \frac{d}{k}. $$

Fourier transforms of the GCD
We can also express the Fourier coefficients in the equation immediately above in terms of the Fourier transform of any function h at the input of $$\operatorname{gcd}(n, k)$$ using the following result where $$c_q(n)$$ is a Ramanujan sum (cf. Fourier transform of the totient function) :


 * $$F_h(m, n) = \sum_{k=1}^{n} h((k,n)) e\left(-\frac{km}{n}\right) = (f \ast c_{\cdot}(m))(n). $$

Thus by combining the results above we obtain that


 * $$a_k(m) = \sum_{d|(m,k)} g(d) f\left(\frac{k}{d}\right) \frac{d}{k} = \sum_{d|k} \sum_{r|d} f(r) g(d) c_{\frac{d}{r}}(m). $$

Sums over prime divisors
Let the function $$a(n)$$ denote the characteristic function of the primes, i.e., $$a(n) = 1$$ if and only if $$n$$ is prime and is zero-valued otherwise. Then as a special case of the first identity in equation (1) in section interchange of summation identities above, we can express the average order sums


 * $$\sum_{n=1}^x \sum_{\stackrel{p|n}{p\text{ prime}}} f(p) = \sum_{p=1}^x a(p) f(p) \left\lfloor \frac{x}{p} \right\rfloor =

\sum_{\stackrel{p=1}{p\text{ prime}}}^x f(p) \left\lfloor \frac{x}{p} \right\rfloor. $$

We also have an integral formula based on Abel summation for sums of the form


 * $$\sum_{\stackrel{p=1}{p\text{ prime}}}^x f(p) = \pi(x) f(x) - \int_2^x \pi(t) f^{\prime}(t) dt \approx

\frac{x f(x)}{\log x} - \int_2^x \frac{t}{\log t} f^{\prime}(t) dt, $$

where $$\pi(x) \sim \frac{x}{\log x}$$ denotes the prime counting function. Here we typically make the assumption that the function f is continuous and differentiable.

Some lesser appreciated divisor sum identities
We have the following divisor sum formulas for f any arithmetic function and g completely multiplicative where $$\varphi(n)$$ is Euler's totient function and $$\mu(n)$$ is the Mobius function :


 * 1) $$\sum_{d|n} f(d) \varphi\left(\frac{n}{d}\right) = \sum_{k=1}^n f(\operatorname{gcd}(n, k)) $$
 * 2) $$\sum_{d|n} \mu(d) f(d) = \prod_{\stackrel{p|n}{p\text{ prime}}} (1-f(p)) $$
 * 3) $$f(m)f(n) = \sum_{d|(m,n)} g(d) f\left(\frac{mn}{d^2}\right). $$