5

Let $d(i)$ be the number of divisors of $i$. I know that $\frac{1}{n}\sum_{1\le i \le n} d(i)= \ln n+\Theta(1)$ as $n$ grows, this can be seen by asking, for each $j$, how many $i$ are there such that $j$ contributes to $d(i)$. This statement can be interpreted as computing the average number of divisors of a random number between 1 and $n$.

I'm wondering how to study $\frac{1}{n}\sum_{1\le i \le n} d(i)^2$, as a way to compute the variance of the number of divisors of a random number between 1 and $n$. This worksheet (see Exercise 2.10) indicates that $\frac{1}{n}\sum_{1\le i \le n} d(i)^2=\Theta(\ln^3 n)$. Is there an easy way to see this?

  • I know a very not-trivial way of seeing it. But it seems that the intended viewpoint may be probabilistic. It wouldn't surprise me if there were a clever probabilistic way of seeing the result – davidlowryduda Jul 05 '13 at 18:41

1 Answers1

2

Consider the Dirichlet generating series of $\tau^2(n)$ $$L(s) = \sum_{n\ge 1}\frac{\tau^2(n)}{n^s}.$$ Since $\tau^2(n)$ is multiplicative it has Euler product $$L(s) = \prod_p \left(1+ \frac{2^2}{p^s} + \frac{3^2}{p^{2s}} + \frac{4^2}{p^{3s}}+\cdots\right).$$ Now observe that $$\sum_{k\ge 0} (k+1) z^k = \frac{1+z}{(1-z)^3} = \frac{1-z^2}{(1-z)^4}.$$ This gives for the Euler product that $$L(s) = \prod_p \frac{1-1/p^{2s}}{(1-1/p^s)^4} = \frac{\zeta^4(s)}{\zeta(2s)}.$$ We can now predict the first terms of the asymptotic expansion of $$q_n = \sum_{k=1}^n \tau^2(k)$$ using the Mellin-Perron summation formula, which gives $$q_n = \frac{1}{2} \tau^2(n) + \frac{1}{2\pi i} \int_{3/2-i\infty}^{3/2+i\infty} L(s) \frac{n^s}{s} ds.$$ The contribution from the pole at $s=1$ is $$\mathrm{Res}\left(L(s) \frac{n^s}{s}; s=1\right) = \frac{1}{\pi^2} n \log^3 n + \left(\frac{12\gamma-3}{\pi^2} -\frac{36\zeta'(2)}{\pi^4}\right) n\log^2 n +\cdots \\ \approx 0.101321183642338 \times n \log^3 n + 0.744341276391456\times n \log^2 n \\+ 0.823265208269489\times n \log n + 0.460323372258732 \times n.$$ The contribution from the pole at $s=0$ is $$\mathrm{Res}\left(L(s) \frac{n^s}{s}; s=0\right) = -\frac{1}{8}$$ but we will not include it here because it lies to the left of the zeros of the $\zeta(2s)$ term on the line $\Re(s) = 1/4.$ This gives the following asymptotic expansion: $$\frac{1}{n} \sum_{k=1}^n \tau^2(k) \sim \frac{1}{2n} \tau^2(n) + \frac{1}{\pi^2} \log^3 n + \left(\frac{12\gamma-3}{\pi^2} -\frac{36\zeta'(2)}{\pi^4}\right) \log^2 n +\cdots.$$

This approximation is excellent, as the following table shows. $$\begin{array}{l|ll} n & q_n/n & \text{approx.} \\ \hline 100 & 30.46 & 30.3377762704858 \\ 400 & 54.33 & 54.1863460568776 \\ 1000 & 75.083 & 75.1903114374140 \\ 5000 & 124.1196 & 124.110890836637 \\ \end{array}$$

Addendum. The reader is invited to supply a rigorous proof of the asymptotic expansion from above.

Marko Riedel
  • 64,728