Given integers $1\le j\le n$, let $p$ denote the largest prime at most $n$. I want to sum $$1/i$$ over all $i=2^{a_2}3^{a_3}\cdots p^{a_p}$ $\,(a_l\ge 0)$ such that both $j,n$ have at least 2 more primes than $i$ (that is, $j,n$ have two distinct prime factors that $i$ does not have or they have 2 more prime powers for some given factor of $i$).
For example, if $j=2^2, n=3^2$, I would sum over all $i$ which have no factors of 2,3; that is, $i$ of the form $i=5^{a_5}\cdots p^{a_p}$ to obtain $$\sum_{i=5^{a_5}\cdots{p^{a_p}}}1/i=\sum_{a_k\ge 0}\frac{1}{5^{a_5}\cdots p^{a_p}}=5/4*7/6$$
where the last equation follows by geometric series: $\sum 1/p^{a_p}=p/(p-1)$.
Is it possible to derive a formula in case $j,n$ have nontrivial prime powers and possibly common factors? E.g, what would the sum look like if $j=2^43^25, n=2^23^37$? I'm not as interested in the evaluation of the sum as I am in seeing how to set up the summation.
I've tried also considering the complement, that is, the sum over $i$ such that it's not the case that $j,n$ both have 2 primes (or 2 prime factors) that $i$ doesn't have, but I've had no luck.
I don't think my approach is correct in the general case since any potential formulas I derived involved arbitrary use of the inclusion-exclusion principle.
Added Example: Let, $j=2^3, n=3^2$, then we sum over $i$ which have at most 1 factor of $2$, $0$ factors of $3$ and any number of factors of $5,7$. I.e., $i=2^a5^b7^c$ with $a=0,1$ and $b,c\ge 0$. So $$\sum_{i=5^a7^b,2*5^a7^b}\frac{1}{i}=\sum_{a=0,1, b\ge 0, c\ge 0}\frac{1}{2^a 5^b7^c}=\sum_{b,c\ge 0}\bigg(\frac{1}{5^b7^c}+\frac{1}{2*5^b7^c}\bigg)=\frac{5}{4}\frac{7}{6}+\frac{1}{2}\frac{5}{4}\frac{7}{6}$$