# Finding a Formula for a Sum

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}$$

• Did you show $\displaystyle\prod_{p \le k} \frac{1}{1-p^{-s}} = \sum_{ n, \text{Lpf}(n) \le k} n^{-s}$ where $\text{Lpf}$ is the largest prime factor ? Did you try things like $\displaystyle\prod_{p \le k} (1+\frac{p^{-sm}}{1-p^{-s}})$ ? – reuns Aug 2 '17 at 9:03
• Depending on $j, k$, there can be many sums, possibly using inclusion-exclusion. I'm not sure how these factors you gave take both $j, k$ into account. – The Substitute Aug 7 '17 at 19:51
• Could you please give some examples and elaborate little more in order for us to understand the question! – Ahmad Aug 14 '17 at 8:44
• @Ahmad I've included an additional example. – The Substitute Aug 14 '17 at 9:19
• After some working on this problem, it seems that it don't follow any particular form and there is no easy way to write a complete formula for this problem since it will contain a lot of prime number function that are not easy to compute such as the number of prime factor and how many powers there are but it can be bounded between $\frac{6}{\pi^2} e^\gamma \ln n$ and $e^\gamma \ln n$ which are strict bounds (to be true multiplied by small factor, see Dusart papers), other than this i think there will be no helpful improvements because its too general and too many special cases to dealt with – Ahmad Aug 16 '17 at 4:53