# Finding a seven-digit number with all of its prime factors less than 20? [closed]

How can I find a seven-digit number with all of its prime factors less than 20?

I have no clue how to do this.

## closed as off-topic by Dr. belisarius, MarcoB, Daniel Lichtblau, dr.blochwave, Simon WoodsFeb 4 '16 at 22:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "The question is out of scope for this site. The answer to this question requires either advice from Wolfram support or the services of a professional consultant." – Dr. belisarius, MarcoB, dr.blochwave
If this question can be reworded to fit the rules in the help center, please edit the question.

• It would depend on where one lost it.. – Daniel Lichtblau Feb 4 '16 at 22:48
• I'm voting to close this question as off-topic because not specific to Mathematica software. – Daniel Lichtblau Feb 4 '16 at 22:49
• @DanielLichtblau Let's suppose you didn't lose it. Then find it ad absurdum. – Dr. belisarius Feb 4 '16 at 22:55
• In case someone visits this (badly asked) closed question, it seems to be about smooth numbers. A small code, yet too big for this marginal comment, shows there are 11447 seven-digit numbers composed of only primes less than 20. The smallest is 1000000, the largest is 9997020. – KennyColnago Mar 20 '16 at 1:14

Given that the 8th prime is less than 20 (Prime[8] = 19), then the product of all primes up to and including that one is:

Times @@ Prime[Range[8]]


(* 9699690 *)

You can list those primes:

Prime[Range[8]]


You can answer the generalized problem from the below figure, e.g., How many distinct, sequential, smallest prime factors are needed to get a number greater than $10^{18}$?

ListLogPlot[Table[{i, Times @@ Prime[Range[i]]}, {i, 1, 20}],
AxesLabel -> {Text[
Style["number of\n sequential prime\n factors of \!$$\* StyleBox[\"x\",\nFontSlant->\"Italic\"]$$", 18]], Text[Style["\!$$\* StyleBox[\"x\",\nFontSlant->\"Italic\"]$$", 18]]},
ImageSize -> 500]


• This is a great answer since it even works for distinct primes. Of course, if the primes can repeat, 2^20 gets my vote. – barrycarter Feb 5 '16 at 1:35
• Well sure... $2^{20}$. – David G. Stork Feb 5 '16 at 1:52