# Asymptotic behavior of $\{\text{#}(a,x,b,y)\in \mathbb{N^4}| \text{ }ax+by=n\}$ for large $n$

For a fixed natural number $n$ is it possible to obtain an asymptotic for the number of solutions $(a,x,b,y)\in\mathbb{N^4}$ to $ax+by=n$ or equivalently an asymptotic for $\sum_{k=1}^{n-1}d(k)d(n-k)$?

Using some heuristics I got that possibly:

$$\sum_{k=1}^{n-1}d(k)d(n-k)\sim \frac{3}{\pi^2}\sigma(n)\ln(n)^2$$

I wrote:

$$\sum\limits_{k=1}^{n-1}d(k)d(n-k)=\sum\limits_{{(a,x,b,y)\in \mathbb{N^4}}\atop{ax+by=n} }1=\sum\limits_{d\mid n}\sum\limits_{{(a,x,b,y)\in \mathbb{N^4}}\atop{(a,b)=d,ax+by=n}}1 =\sum\limits_{d\mid n}\sum_{{(a,x,b,y)\in \mathbb{N^4}}\atop(a,b)=1,{ax+by=\frac{n}{d}}}1$$ $$=\sum\limits_{d\mid n}\sum\limits_{{(a,b)\in \mathbb{N^2}}\atop{(a,b)=1}}\sum\limits_{{(x,y)\in \mathbb{N^2}}\atop{ax+by=\frac{n}{d}}}1$$

Now I considered a fixed natural number $m$ and looked at the solutions $(x,y)$ to $ax+by=m$

Then noted that $x\leq \frac{m-b}{a}$ and that the solutions $x$ would be of the form: $x\equiv c+a,c+2b,c+3b,c+4b,...c+kb$, so I wrote $c+kb\leq\frac{m-b}{a}\implies k\leq \frac{m-b}{ab}-\frac{c}{b}$

So the largest such $k$ that should satisfy this is $\lfloor{\frac{m-b}{ab}-\frac{c}{a}}\rfloor\approx \lfloor{\frac{m}{ab}}\rfloor$

Then went back and wrote:

$$\sum\limits_{k=1}^{n-1}d(k)d(n-k)\approx \sum\limits_{d\mid n}\sum\limits_{{(a,b)\in \mathbb{N^2}}\atop(a,b)=1}\lfloor{\frac{n/d}{ab}}\rfloor\approx \sum\limits_{d\mid n}\frac{n}{d}\sum\limits_{{ab\leq n,(a,b)=1}\atop(a,b)\in \mathbb{N^2}}\frac{1}{ab}$$ $$=\sigma(n)\sum\limits_{ab\leq n\atop(a,b)=1}\frac{1}{ab}=\sigma(n)\sum\limits_{k\leq \sqrt{n}}\frac{\mu(k)}{k^2}\sum\limits_{ab\leq \frac{n}{k^2}}\frac{1}{ab}=\sigma(n)\sum\limits_{k\leq \sqrt{n}}\frac{\mu(k)}{k^2}\sum\limits_{j\leq \frac{n}{k^2}}\frac{d(j)}{j}$$ $$\approx\sigma(n)\sum\limits_{k\leq \sqrt{n}}\frac{\mu(k)}{k^2}\frac{\ln(n/k^2)^2}{2}\sim\frac{\sigma(n)\ln(n)^2}{2}\sum_{k\ge 1}\frac{\mu(k)}{k^2}=\frac{3}{\pi^2}\sigma(n)\ln(n)^2$$

But this doesn't seem right either because I know that,

$$\sum_{ax+by\leq m\atop(a,x,b,y)\in \mathbb{N^4}}1=\frac{m^2\ln(m)^2}{2}+(2\gamma-\frac{3}{2})m^2\ln(m)+(2\gamma^2-\frac{5}{2}\gamma-\frac{\pi^2}{12}+\frac{3}{2})m^2+O(m^{1+\theta}\ln(m))$$

Where $\theta$ is the same $\theta$ in Dirichlet's divisor problem.

Thus I would expect that if $\sum\limits_{k=1}^{n-1}d(k)d(n-k)\sim C'\sigma(n)\ln(n)^2$ for some constant $C'$ that we would then have that $C'=\frac{6}{\pi^2}$, which it isn't according to the last heuristic.

So I'm not really sure how to proceed, and would really appreciate any help in finding an asymptotic expansion for $\sum\limits_{k=1}^{n-1}d(k)d(n-k)$.

-
I think the problem in your initial computation is that $ab$ can be as large as $n^2$, and your approximation $\lfloor \frac{m}{ab} \rfloor \approx \frac{m}{ab}$ is terrible in that regime. But note that one of $ab$ or $xy$ has to be bounded by $n$, so by paying a factor of two one can basically restrict to the regime $ab \leq n$ where your heuristic argument is reasonably accurate, explaining the loss of 2 in your initial prediction. –  Terry Tao Feb 7 at 21:00

This is a binary additive divisor problem (also known as the shifted convolution problem) and related questions are to understand asymptotics for $\sum_{n\le x} d(n) d(n+k)$, or $\sum_{n\le x} \lambda_f(n) \lambda_f(n+k)$ where $\lambda_f$ denotes the Fourier coefficients of a cusp form. For your particular problem, Ingham first showed the asymptotic formula $$\sum_{k=1}^{n-1} d(k) d(n-k) \sim \frac{6}{\pi^2} \sigma(n) (\log n)^2.$$ See for example Motohashi's paper http://archive.numdam.org/ARCHIVE/ASENS/ASENS_1994_4_27_5/ASENS_1994_4_27_5_529_0/ASENS_1994_4_27_5_529_0.pdf which discusses this asymptotic formula, with strong error terms.