For distinct primes $p$ and $q$ (where $p < q$), the following sum $$\sum_{n=0}^{\infty} \sum_{k=0}^n \frac{1}{p^n q^k}$$ yields the expression $\frac{f}{g}$ such that $$f = p^2 q$$ and $$g \equiv 1 \ (\text{mod} \ p).$$ The problem I'm having is finding an expression for $g$ in terms of $p$ and $q$. I'm probably just overlooking something.
-
$\begingroup$ What relation are you talking about? This isn’t very clear. $\endgroup$– ViHdzPCommented Jan 8, 2020 at 3:53
-
$\begingroup$ How can you express g as a function of p and q? $\endgroup$– user580424Commented Jan 8, 2020 at 3:57
-
$\begingroup$ Sum looks like $pq/((p-1)(q-1))$. Since $p<q$ we might have $p|(q-1)$. $\endgroup$– almagestCommented Jan 8, 2020 at 9:58
-
$\begingroup$ What are you getting for the sum? $\endgroup$– almagestCommented Jan 8, 2020 at 12:31
-
1$\begingroup$ If the sum were taken over all possible combinations, it should have been written $\sum_{n=0}^\infty \sum_{m=0}^\infty \frac{1}{p^n q^m}$. $\endgroup$– user580424Commented Jan 8, 2020 at 13:13
1 Answer
Wikipedia's Geometric series article gives the formulas for the sums of a finite & infinite geometric series of
$$\sum_{k = 0}^{n-1}ar^k = a\left(\frac{1-r^n}{1-r}\right) \tag{1}\label{eq1A}$$
$$\sum_{k = 0}^{\infty}ar^k = \frac{a}{1-r}, \text{ for } \left|r\right| \lt 1 \tag{2}\label{eq2A}$$
Using \eqref{eq1A} and \eqref{eq2A}, plus making a few other manipulations as shown below, gives the following simplifications of your double summation
$$\begin{equation}\begin{aligned} \sum_{n=0}^{\infty} \sum_{k=0}^n \frac{1}{p^n q^k} & = \sum_{n=0}^{\infty}\frac{1}{p^n} \sum_{k=0}^n \frac{1}{q^k} \\ & = \sum_{n=0}^{\infty}\frac{1}{p^n}\left(\frac{1-\left(\frac{1}{q}\right)^{n+1}}{1-\frac{1}{q}}\right) \\ & = \sum_{n=0}^{\infty}\frac{1}{p^n}\left(\frac{q-\left(\frac{1}{q}\right)^{n}}{q - 1}\right) \\ & = \left(\frac{1}{q-1}\right)\left(q\sum_{n=0}^{\infty}\frac{1}{p^n} - \sum_{n=0}^{\infty}\left(\frac{1}{pq}\right)^n \right) \\ & = \left(\frac{1}{q-1}\right)\left(\frac{q}{1-\frac{1}{p}} - \frac{1}{1 - \frac{1}{pq}}\right) \\ & = \left(\frac{1}{q-1}\right)\left(\frac{pq}{p - 1} - \frac{pq}{pq - 1}\right) \\ & = \left(\frac{pq}{q-1}\right)\left(\frac{(pq - 1) - (p - 1)}{(p - 1)(pq - 1)}\right) \\ & = \left(\frac{pq}{q-1}\right)\left(\frac{pq - p}{(p - 1)(pq - 1)}\right) \\ & = \left(\frac{p^2q}{q-1}\right)\left(\frac{q - 1}{(p - 1)(pq - 1)}\right) \\ & = \frac{p^2q}{(p - 1)(pq - 1)} \end{aligned}\end{equation}\tag{3}\label{eq3A}$$
As such, you have
$$g = (p - 1)(pq - 1) \tag{4}\label{eq4A}$$
Note this also confirms the modulo statement you have of
$$g \equiv 1 \pmod p \tag{5}\label{eq5A}$$