Your challenge is to find the smoothest number over a given range. In other words, find the number whose greatest prime factor is the smallest.
A smooth number is one whose largest prime factor is small. Numbers of this type are useful for the fast Fourier transform algorithm, cryptanalysis, and other applications.
For instance, over the range
5, 6, 7, 8, 9, 10, 8 is the smoothest number, because 8's greatest prime factor is 2, whereas all of the other numbers have a prime factor of 3 or greater.
Input: The input will be two positive integers, which define a range. The minimum allowable integer in the range is 2. You may choose whether the range is inclusive, exclusive, semi-exclusive, etc, as long as an arbitrary range can be specified within the bounds of your language. You may take the numbers via function input, stdin, command line argument, or any equivalent method for your language. No encoding extra information in the input.
Output: Return, print or equivalent one or more integers in the input range which are maximally smooth (minimal greatest factor). Returning multiple results is optional, but if you choose to do so the results must be clearly delimited. Native output format is fine for multiple results.
Please state in your answer how you are taking input and giving output.
Scoring: Code golf. Count by characters if written in ASCII, or 8*bytes/7 if not in ASCII.
Note: These are Python-style ranges, including the low end but not the high end. Change as appropriate to your program. Only one result is necessary.
smooth_range(5,11) 8 smooth_range(9,16) 9, 12 smooth_range(9,17) 16 smooth_range(157, 249) 162, 192, 216, 243 smooth_range(2001, 2014) 2002