If we take the Primorial formula and remove $(2⋅3⋅5⋅7)$, we are left with:
$p_n\#=\prod_{k=5}^{n}p_k$ ($k=5$ because $11$ is the $5$th prime).
$p_n\#=11⋅13⋅17⋅19⋅23⋅29⋅31⋅...$.
The product is getting bigger and bigger rapidly.
In comparison the combined sequence made of $(3^x⋅5^y⋅7^z)$ and $(2^w⋅3^x⋅5^y⋅7^z)$ grows much more slowly and much more densely.
I was trying to compute an algorithm that calculates the difference of $(p_n\# - 3^x⋅5^y⋅7^z)$ Or $(p_n\# - 2^w⋅3^x⋅5^y⋅7^z)$ Where either $(3^x⋅5^y⋅7^z)$ or $(2^w⋅3^x⋅5^y⋅7^z)$ is closest to $p_n\#$.
My motivation to check the difference was because it represent the smallest gap in which there must be a prime.
I then realized that my Idea didn't have any meaning since $p_n\#$ could result in any number, and that I might as well calculate the max gap between $(3^x⋅5^y⋅7^z)$ or $(2^w⋅3^x⋅5^y⋅7^z)$ and the closest $(3^r⋅5^s⋅7^t)$ or $(2^q⋅3^r⋅5^s⋅7^t)$.
My logic is every $P_n\#$ can be any integer as $A$, If I know the max gap as $G$ between $(3^x⋅5^y⋅7^z)$ or $(2^w⋅3^x⋅5^y⋅7^z)$ and the closest $(3^r⋅5^s⋅7^t)$ or $(2^q⋅3^r⋅5^s⋅7^t)$, the distance between any $A$ and $(3^x⋅5^y⋅7^z)$ or $(2^w⋅3^x⋅5^y⋅7^z)$ can not be bigger than this max gap without having another $(3^r⋅5^s⋅7^t)$ or $(2^q⋅3^r⋅5^s⋅7^t)$ before it.
As an example, this will allow me to easily roughly estimate :
$11⋅13⋅17⋅19⋅23⋅29⋅31 = 955049953$.
Knowing that the first $10$: $(3^x⋅5^y⋅7^z)$ or $(2^w⋅3^x⋅5^y⋅7^z)$ are: $105,210,315,420,525,630,735,840,945,1050$.
I can quickly do $D = 955049953 - (945 ⋅1000000)=10049953 $ and improve on the answer if it is bigger than the max gap $G$.
If the max gap $G$ for example is $250000$, I know that the answer can be improved because there will be at least $4$: $(3^x⋅5^y⋅7^z)$ or $(2^w⋅3^x⋅5^y⋅7^z)$ between $(945 ⋅1000000)$ and $955049953$.
We do not know where these $(3^x⋅5^y⋅7^z)$ or $(2^w⋅3^x⋅5^y⋅7^z)$ are but we know that the last one can not be smaller than $955049953 -250000$ and that makes: $955049953- (955049953 -250000) = 250000$.
Therefor In the example above the max gap between $31$ and the next prime is $250000$, which is $G$ itself.
Is there a way to calculate the max gap between $(3^x⋅5^y⋅7^z)$ or $(2^w⋅3^x⋅5^y⋅7^z)$ and the closest $(3^r⋅5^s⋅7^t)$ or $(2^q⋅3^r⋅5^s⋅7^t)$?
Any references are appreciated too.
(I chose ($2⋅3⋅5⋅7$) because right a way there is: $105,210,315,420,525,630,735,840,945,1050$.)
(If this question has a duplicate with a title that I didn't know was related, please close and refer.)
It is not quite what you asked about, but the gaps get arbitrarily small in a multiplicative sense. Note that $\log \left(\frac {2^w\cdot 3^x}{5^y\cdot 7^z}\right)=w \log 2 +x \log 3 -y\log 5 -z \log 7$. We can choose integers $w,x,y,z$ to make this very small. It only takes two logs to have this true. Given any large enough number of this form, you can multiply or divide by the combination of exponents that is very close to $1$. For example, $\frac {2^{1064}}{3^{665}}$ is within $50$ parts in a million of $1$ and $\frac {2^{301994}}{3^{190537}}$ is within $65$ parts in a billion. The additive gaps probably get very large, however, because these multiply such huge numbers.