Revision f3b10c15-689c-447c-95e8-ffbaa55dfc72 - Code Golf Stack Exchange

#Mathematica <s>82</s> 72 


 n_~u~k_:=(c=1;m=1;While[m <= n,If[FactorInteger[c][[-1,1]]<=k,m++];c++];c-1)

**Usage**

 

 u[1, 5]
 u[5, 2]
 u[20, 3]
 u[57, 5]
 u[66, 13]
 u[100, 5]
 u[1000, 25]

>1 
16 
96 
324 
110 
1536 
5474


----------


Prime factors and their powers are in the center column.

 Table[{t, FactorInteger[t], u[t, 5]}, {t, 15}] // Grid


![data][1]


 [1]: https://i.sstatic.net/Va4EP.png

AltStyle によって変換されたページ (->オリジナル) /