$ n$ is a fixed positive integer and $ p$ is the largest prime $ \le n$ :
p = Prime[PrimePi[n]]
For each subset $ L$ of positive composite integers less than or equal to $ n$ –i.e., for each element $ L$ of:
Subsets[Select[Range[n], CompositeQ]]
I would like to sum $ \sum \frac{1}{i}$ over all positive integers $ i$ such that
(i) $ i$ has no prime factor larger than $ p$ :
FactorInteger[i][[-1, 1]] <= p
and
(ii)
j/GCD(i,j)
is composite for each $ j\in L$ .
How can I incorporate (i) and (ii) into a sum given $ L$ ?
Update: The fact that are are infinitely many $ i$ ‘s corresponding to each $ L$ may cause difficulty. Perhaps I can find all $ i$ satisfying (i) and (ii) where $ i$ is bounded above by some $ N$ ?