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)$.



Asymptotic behavior of $\{\text{#}(a,x,b,y)\in \mathbb{N^4}| \text{ }ax+by=n\}$ for large $n$
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. 


