  Motivated by arithmetic applications on the number of points in a
bihomogeneous variety and on moments of Dirichlet $L$-functions, we provide
analytic continuation for the series $\mathcal
A_{\boldsymbol{a}}(s):=\sum_{n_1,\dots,n_k\geq1}\frac{d(n_1)\cdots
d(n_k)}{(n_1\cdots n_k)^{s}}$ with the sum restricted to solutions of a
non-trivial linear equation $a_1n_1+\cdots+a_kn_k=0$. The series $\mathcal
A_{\boldsymbol{a}}(s)$ converges absolutely for $\Re(s)>1-\frac1k$ and we show
it can be meromorphically continued to $\Re(s)>1-\frac 2{k+1}$ with poles at
$s=1-\frac1{k-j}$ only, for $1\leq j< (k-1)/2$.
  As an application, we obtain an asymptotic formula with power saving error
term for the number of points in the variety $a_1x_1y_1+\cdots+a_kx_ky_k=0$ in
$\mathbb P^{k-1}(\mathbb Q)\times \mathbb P^{k-1}(\mathbb Q)$.
