$\def\peq{\mathrel{\phantom{=}}{}}$Supongamos $p_1 < \cdots < p_s$ son todos los números primos no mayor de $n$ e$$
a = \prod_{k = 1}^s p_k^{a_k}, \quad b = \prod_{k = 1}^s p_k^{b_k}.
$$
Definir\begin{align*}
A_0 &= \{(j_1, \cdots,j_s) \in \mathbb{N}^s \mid j_k \geqslant a_k\ (\forall 1 \leqslant k \leqslant s)\},\\
A_1 &= \{(j_1, \cdots,j_s) \in \mathbb{N}^s \mid \exists 1 \leqslant k_0 \leqslant s,\ j_{k_0} = a_{k_0} - 1,\ j_k \geqslant a_k\ (\forall k ≠ k_0)\},\\
B_0 &= \{(j_1, \cdots,j_s) \in \mathbb{N}^s \mid j_k \geqslant b_k\ (\forall 1 \leqslant k \leqslant s)\},\\
B_1 &= \{(j_1, \cdots,j_s) \in \mathbb{N}^s \mid \exists 1 \leqslant k_0 \leqslant s,\ j_{k_0} = b_{k_0} - 1,\ j_k \geqslant b_k\ (\forall k ≠ k_0)\},
\end{align*}
y $A = \mathbb{N}^s \setminus (A_0 \cup A_1)$, $B = \mathbb{N}^s \setminus (B_0 \cup B_1)$. Para $j = (j_1, \cdots, j_s) \in \mathbb{N}^s$, definir $\displaystyle p^j = \prod_{k = 1}^s p_k^{j_k}$, entonces la suma a ser encontrado es\begin{align*}
\sum_{j \in A \cap B} \frac{1}{p^j} &= \sum_{j \in \mathbb{N}^s} \frac{1}{p^j} - \sum_{j \in A^c \cup B^c} \frac{1}{p^j} = \prod_{k = 1}^s \frac{p_k}{p_k - 1} - \sum_{j \in A^c \cup B^c} \frac{1}{p^j}.
\end{align*}
Tenga en cuenta que $A^c = A_0 \cup A_1$, $B^c = B_0 \cup B_1$, $A_0 \cap A_1 = \varnothing$, $B_0 \cap B_1 = \varnothing$, por lo tanto\begin{align*}
\sum_{j \in A^c \cup B^c} \frac{1}{p^j} &= \sum_{j \in A^c} \frac{1}{p^j} + \sum_{j \in B^c} \frac{1}{p^j} - \sum_{j \in A^c \cap B^c} \frac{1}{p^j}\\
&= \sum_{j \in A_0} \frac{1}{p^j} + \sum_{j \in A_1} \frac{1}{p^j} + \sum_{j \in B_0} \frac{1}{p^j} + \sum_{j \in B_1} \frac{1}{p^j} - \sum_{j \in A^c \cap B^c} \frac{1}{p^j}.
\end{align*}
Para las cuatro primeras sumas,$$
\sum_{j \en A_0} \frac{1}{p^j} = \prod_{k = 1}^s \sum_{m = a_k}^∞ \frac{1}{p_k^m} = \prod_{k = 1}^s \frac{1}{(p_k - 1) p_k^{a_k - 1}} = \frac{1}{a} \prod_{k = 1}^s \frac{p_k}{p_k - 1},
$$\begin{align*}
\sum_{j \in A_1} \frac{1}{p^j} &= \sum_{a_k \geqslant 1} \frac{1}{p_k^{a_k - 1}} \prod_{l ≠ k} \sum_{m = a_l}^∞ \frac{1}{p_l^m} = \sum_{a_k \geqslant 1} \frac{1}{p_k^{a_k - 1}} \prod_{l ≠ k} \frac{1}{(p_l - 1) p_l^{a_l - 1}}\\
&= \sum_{a_k \geqslant 1} (p_k - 1) \prod_{l = 1}^s \frac{1}{(p_l - 1) p_l^{a_l - 1}} = \frac{1}{a} \left( \sum_{a_k \geqslant 1} (p_k - 1) \right) \left( \prod_{k = 1}^s \frac{p_k}{p_k - 1} \right),
\end{align*}
y de forma análoga,$$
\sum_{j \en B_0} \frac{1}{p^j} = \frac{1}{b} \prod_{k = 1}^s \frac{p_k}{p_k - 1},\quad \sum_{j \en B_1} \frac{1}{p^j} = \frac{1}{b} \left( \sum_{b_k \geqslant 1} (p_k - 1) \right) \left( \prod_{k = 1}^s \frac{p_k}{p_k - 1} \right).
$$
Siguiente, tenga en cuenta que$$
\sum_{j \en A^c \cap B^c} \frac{1}{p^j} = \sum_{j \en A_0 \cap B_0} \frac{1}{p^j} + \sum_{j \en A_1 \cap B_0} \frac{1}{p^j} + \sum_{j \en A_0 \cap B_1} \frac{1}{p^j} + \sum_{j \en A_1 \cap B_1} \frac{1}{p^j}.
$$
Definir $c_k = \max(a_k, b_k)$$1 \leqslant k \leqslant s$,$$
\sum_{j \en A_0 \cap B_0} \frac{1}{p^j} = \prod_{k = 1}^s \sum_{m = c_k}^∞ \frac{1}{p_k^m} = \prod_{k = 1}^s \frac{1}{(p_k - 1) p_k^{c_k - 1}} - \frac{1}{[a, b]} \prod_{k = 1}^s \frac{p_k}{p_k - 1},
$$\begin{align*}
\sum_{j \in A_1 \cap B_0} \frac{1}{p^j} &= \sum_{a_k - b_k \geqslant 1} \frac{1}{p_k^{a_k - 1}} \prod_{l ≠ k} \sum_{m = c_l}^∞ \frac{1}{p_l^m} = \sum_{a_k - b_k \geqslant 1} \frac{1}{p_k^{a_k - 1}} \prod_{l ≠ k} \frac{1}{(p_l - 1) p_l^{c_l - 1}}\\
&= \left( \sum_{a_k - b_k \geqslant 1} (p_k - 1) p_k^{c_k - a_k} \right) \left( \prod_{k = 1}^s \frac{1}{(p_k - 1) p_k^{c_k - 1}} \right)\\
&= \frac{1}{[a, b]} \left( \sum_{a_k - b_k \geqslant 1} (p_k - 1) p_k^{c_k - a_k} \right) \left( \prod_{k = 1}^s \frac{p_k}{p_k - 1} \right)\\
&= \frac{1}{[a, b]} \left( \sum_{a_k - b_k \geqslant 1} (p_k - 1) \right) \left( \prod_{k = 1}^s \frac{p_k}{p_k - 1} \right),
\end{align*}
$$
\sum_{j \en A_0 \cap B_1} \frac{1}{p^j} = \frac{1}{[a, b]} \left( \sum_{b_k - a_k \geqslant 1} (p_k - 1) \right) \left( \prod_{k = 1}^s \frac{p_k}{p_k - 1} \right).
$$
Puesto que existe no $k$ tal que $a_k - b_k \geqslant 1$$b_k - a_k \geqslant 1$,\begin{align*}
\sum_{j \in A_1 \cap B_1} \frac{1}{p^j} &= \sum_{\substack{a_{k_1} - b_{k_1} \geqslant 1\\b_{k_2} - a_{k_2} \geqslant 1}} \frac{1}{p_{k_1}^{a_{k_1} - 1} p_{k_2}^{b_{k_2} - 1}} \prod_{l ≠ k_1, k_2} \sum_{m = c_l}^∞ \frac{1}{p_l^m}\\
&= \sum_{\substack{a_{k_1} - b_{k_1} \geqslant 1\\b_{k_2} - a_{k_2} \geqslant 1}} \frac{1}{p_{k_1}^{a_{k_1} - 1} p_{k_2}^{b_{k_2} - 1}} \prod_{l ≠ k_1, k_2} \frac{1}{(p_l - 1) p_l^{c_l - 1}}\\
&= \Biggl( \sum_{\substack{a_{k_1} - b_{k_1} \geqslant 1\\b_{k_2} - a_{k_2} \geqslant 1}} (p_{k_1} - 1)(p_{k_2} - 1) p_{k_1}^{c_{k_1} - a_{k_1}} p_{k_2}^{c_{k_2} - b_{k_2}} \Biggr) \left( \prod_{k = 1}^s \frac{1}{(p_k - 1) p_k^{c_k - 1}} \right)\\
&= \frac{1}{[a, b]} \Biggl( \sum_{\substack{a_{k_1} - b_{k_1} \geqslant 1\\b_{k_2} - a_{k_2} \geqslant 1}} (p_{k_1} - 1)(p_{k_2} - 1) \Biggr) \left( \prod_{k = 1}^s \frac{p_k}{p_k - 1} \right)\\
&= \frac{1}{[a, b]} \left( \sum_{a_k - b_k \geqslant 1} (p_k - 1) \right) \left( \sum_{b_k - a_k \geqslant 1} (p_k - 1) \right) \left( \prod_{k = 1}^s \frac{p_k}{p_k - 1} \right).
\end{align*}
Por lo tanto, después de la combinación de términos,\begin{align*}
\sum_{j \in A \cap B} \frac{1}{p^j} &= \prod_{k = 1}^s \frac{p_k}{p_k - 1}\\
&\peq -\left( \frac{1}{a} \left( \sum_{a_k \geqslant 1} (p_k - 1) + 1 \right) + \frac{1}{b} \left( \sum_{b_k \geqslant 1} (p_k - 1) + 1 \right) \right) \left( \prod_{k = 1}^s \frac{p_k}{p_k - 1} \right)\\
&\peq + \frac{1}{[a, b]} \left( \sum_{a_k - b_k \geqslant 1} (p_k - 1) + 1 \right) \left( \sum_{b_k - a_k \geqslant 1} (p_k - 1) + 1 \right) \left( \prod_{k = 1}^s \frac{p_k}{p_k - 1} \right).
\end{align*}