How does the sum of all divisor counts up to n grow? Dirichlet's answer — n log n with a precise error — is 175 years old. The sharp error bound is still open.
How large is τ(1)+τ(2)+⋯+τ(n)?
Individual divisor counts τ(k) jump erratically — τ(p)=2 for primes, τ(12)=6, τ(1024)=11. There is no clean formula for τ(k).
But the sum is smooth. Averaging washes out the fluctuations. Dirichlet found the precise asymptotic in 1849, and it is one of the most beautiful results in elementary analytic number theory.
The main theorem
Theorem (Dirichlet, 1849). Let D(n)=k=1∑nτ(k). Then:
D(n)=nlnn+(2γ−1)n+O(n)
where γ≈0.5772… is the Euler-Mascheroni constant.
Equivalently: the average number of divisors of integers up to n is lnn+(2γ−1)+O(1/n).
Each pair (a,b) with ab≤n corresponds to a divisor a of some k=ab≤n.
Step 2: Count using symmetry
Let m=⌊n⌋. Split the region ab≤n by the diagonal a=b:
D(n)=2∑a=1m⌊an⌋−m2
Now approximate ⌊n/a⌋≈n/a:
∑a=1m⌊an⌋=n∑a=1ma1−∑a=1m{an}
where {x} is the fractional part. The second sum is O(m)=O(n) since each term is in [0,1).
Using Hm=lnm+γ+O(1/m) and m=n+O(1):
∑a=1ma1=lnn+γ+O(1/n)=21lnn+γ+O(1/n)
Therefore:
2∑a=1m⌊an⌋=2n(21lnn+γ)+O(n)=nlnn+2γn+O(n)
Subtracting m2=n+O(n):
D(n)=nlnn+2γn−n+O(n)=nlnn+(2γ−1)n+O(n)
■
The error term — the open problem
Dirichlet showed the error is O(n). In 1903, Voronoï improved this to O(n1/3logn).
The conjecture — called the Dirichlet Divisor Conjecture — is that the error is O(n1/4+ε) for any ε>0.
The lower bound Ω(n1/4) is known — the error is at least this large infinitely often.
The best upper bound (Huxley, 2003): O(n131/416) where 131/416≈0.3149.
The gap between 0.25 (conjecture) and 0.3149 (best known) has not closed in over 20 years.
Why 2γ−1?
The constant 2γ−1≈0.1544 arises from two sources:
2γ: from the harmonic sum approximation, with the Euler-Mascheroni constant appearing twice (once from each side of the symmetry argument)
−1: from subtracting m2≈n
The fact that γ appears here — the same constant that measures the gap between Hn and lnn — is not a coincidence. Both come from approximating a discrete sum by a continuous integral over 1/x.
Consequences and connections
Average divisor count.τ(1)+⋯+τ(n))/n∼lnn. A typical integer near n has about lnn divisors.
Highly composite numbers. Numbers with unusually many divisors (like 12, 24, 60, 120...) are the outliers — they pull the average up. Most numbers near them have far fewer divisors.
Connection to Riemann zeta function. The Dirichlet series:
∑n=1∞nsτ(n)=ζ(s)2
where ζ(s)=∑n−s is the Riemann zeta function. The divisor problem is equivalent to understanding the behavior of ζ(s)2 near s=1.
The Riemann Hypothesis (on the zeros of ζ) would imply the Dirichlet Divisor Conjecture — but neither is proved.
Error: 27−24.57=2.43. And 10≈3.16. Error is well within O(n). ✓
Problem 2. Estimate the number of (a,b,c) triples with abc≤n.
Generalizing: #{abc≤n}=∑k=1nτ3(k) where τ3(k) counts ordered triples (a,b,c) with abc=k.
By a similar lattice point argument: ∑k=1nτ3(k)∼2n(lnn)2.
Problem 3. Show that τ(n)=O(nε) for any ε>0.
For any fixed ε>0, τ(n)<nε for all sufficiently large n. (The divisor function grows slower than any power of n.)
Proof sketch. For n=p1a1⋯pkak: τ(n)=∏(ai+1). Each factor (ai+1)≤2ai for ai≥1, and ai≤log2n. The number of prime factors k≤log2n. So τ(n)≤2k≤2log2n=n. With more careful bounds, τ(n)=O(nε). ■
Problem 4. If τ(n)=n/10, what can you say about n?
From τ(n)=O(nε), τ(n) grows much slower than n. So τ(n)=n/10 is impossible for large n. Checking small values: the equation τ(n)=n/10 would require n=10 with τ(10)=4=1, n=20 with τ(20)=6=2... no solutions exist beyond trivial cases.
Each page in this thread answered one question and raised the next. The floor function counted multiples. Lattice points connected counting to geometry. The hyperbola's area gave the logarithm. The median showed the skewness concretely. Dirichlet's theorem gave the precise asymptotic.
The open question — how sharp is the error O(n) — remains. The answer, if it comes, will require tools from complex analysis far beyond this thread.