A number is defined as being $B-Smooth$ if none of its prime factors are greater than the value of $B$. For example, $105$ is $7-Smooth$, because $105=3\cdot5\cdot7$.
Given a number $B$, how could you generate all $B-Smooth$ numbers up to a given number $N$?
Would it be best to check every number below $N$ to see if it is $B-Smooth$ by factorizing it? Would it be more efficient to generate all $B-Smooth$ numbers using a combination of powers on the products of all the primes up to $B$? Could you use a sieve method and simply remove numbers that are multiples of any prime greater than $B$ (like the sieve of Eratosthenes)?