A constrained double summation Let $(k,l)$ be coprime positive integers, $(k,l)=1$. Let $p,q$ be two real number satisfying $0<p<1$ and $0<q<1$. Consider the following summation:
\begin{equation}
{\sum_{n_1,n_2=0}^{+\infty}}' p^{n_1} q^{n_2},
\end{equation}
where the summation is constrained to be $ln_1 - n_2 \equiv 0, \mod k$. For $l = 1$ it is straightforward. Is there a closed formula for the summation when $l > 0$?
 A: $\newcommand{\C}{\mathbb{C}}$This is not an answer but we can obtain a different expression with a more simple finite sum. Let $r$ be a primitive $k$th root of the unity. Your sum is then
$$\frac{1}{k} \sum_{n=0}^{k-1} \frac{1}{(1-pr^{-nl}) (1 - q r^n)}\text{.}$$
(I checked it numerically.)

First, we work in $\C[[X,Y]]$. As noted by Sangchul Lee in the comments, the problem reduces to compute
$$f(X,Y) := \sum_{\substack{0 \leq m, n < k \\ n\equiv lm\pmod{k}}} X^m Y^n \text{.}$$
The idea is to interpolate $f$ from its values on $\{X^k = Y^k = 1\}$, where it becomes simply
$$\sum_{n=0}^{k-1} X^n Y^{nl} = \sum_{n=0}^{k-1} (X Y^l)^n \text{.}$$
Let $\alpha$ and $\beta$ be integers modulo $k$ such that $X = r^\alpha$ and $Y = r^\beta$. Then $f(X,Y)$ is $k$ if $XY^l = 1$ and $0$ otherwise. That is to say, $f(X,Y) = k$ when $\alpha + l \beta = 0$.
The interpolation gives
$$\begin{align*}
f(X,Y) &= \sum_{\substack{\beta=0\\\alpha=-l\beta}}^{k-1}k \times \frac{1-X^k}{k (1 - X r^{-\alpha})} \times \frac{1-Y^k}{k (1 - Y r^{-\beta})}\\
&= \sum_{n=0}^{k-1} \frac{(1-X^k)(1-Y^k)}{k (1-X r^{-l n}) (1-Y r^n)} \text{.}
\end{align*}$$
Dividing by $(1-X^k)(1-Y^k)$, we get the result.
Question: can we interpret the fact that the product appearing in the interpolation simplifies?
