I want to find the next $n \in \mathbb{N}$ such that
$$s < n = \prod_{p_i \in \mathbb{P}_B} {p_i}^{a_i}$$
Where $\mathbb{P}_B$ is the set of primes not greater than $B$ I know that we can generate the factors of these numbers recursively with complexity less than
$$ \prod_{p_i \in \mathbb{P}_B} \frac{log(s)}{log(p_i)}$$
Exponentially less I believe.
For the 3-smooth numbers this answer gives a good intuition
$$ \frac{(\log(s))^2}{2\log 2 \log 3} $$
For the 5-smoothIf we could generalizerestrict the geometric view we would have $$ \frac{(\log(s))^3}{2 \log 2 \log 3 \log 5} $$
Thissearch to the values such that paper$n < z$, cited in thewe have 5-smooth numbers OEIS page$\sum a_i \log(p_i) < \log(z)$, mentions a formula as $$ \frac{(\log(s\sqrt{30}))^3}{6 \log 2 \log 3 \log 5} $$or With an additional term (characteristic function of $a^pb^q$) that I don't understand
Can it be made more efficiently without iterating over all the factors?$\sum a_i \log(p_i)/log(z) < 1$.
An algorithm that comesaccordingly to my mind is, starting with $a_i = 0$,
Findwikipedia the smallest number $n_i$ that dividesvolume of under a standard $p_i^{a_i+1}$ and also divides all the$n-$simlex $p_j^{a_j}$$1/(n+1)!$, then I increase $a_i$ and repeat untilso we havereduce the exact factorizationnumber of $n_i$.candidates to
For the factor generation, what is the complexity, if$$ \frac{1}{\pi(B)!}\prod_{p_i \in \mathbb{P}_B} \frac{log(z)}{log(p_i)}$$
In particular we have one factor itknow that there is clear to be $O(s)$, if we have all the primes under $\sqrt{p}$ I think it will be $O(s \log(s))$, like the sieve Eratosthenes. The later does at most $log(s)$ iterations and each iteration requires to find the minimumone power of $\pi(B)$ candidates, thus $\pi(B) \log(s)$, that if we take$p_i$ between $B=s$,$n$ and approximate $\pi(s) \approx s/\log(s)$$n p_i$, we reduceand the complexity to $O(s)$formula becomes
My main questions are
$$ \frac{2^{\pi(B)}}{\pi(B)!}\prod_{p_i \in \mathbb{P}_B} \frac{log(s)}{log(p_i)} = \frac{(2\log(s))^{\pi(B)}}{\pi(B)!}\prod_{p_i \in \mathbb{P}_B} \frac{1}{log(p_i)}$$
Is the process correct (or I missed something in my reasoning)?
What would be the complexity for the factor set algorithm?
Are there standard algorithms for this problem?