Can I efficiently enumerate all numbers in a range that have a prime factor in another given range?

49 Views Asked by At

Suppose $a<b$ are positive integers. The object is to determine all the numbers $x\in [a,b]$ having a prime factor in the range $[c,d]$ efficiently (that is without factoring all the numbers in the range or other brute-force approaches).

Example : Which numbers in the range $[40!-10^9,40!+10^9]$ have a prime factor in the range $8\cdot 10^{15},10^{16}$ ?