RosettaCodeData/Task/Euclid-Mullin-sequence/Mathematica/euclid-mullin-sequence.math

11 lines
141 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
list = {2};
Do[
prod = Times @@ list;
prod++;
new = Min[FactorInteger[prod][[All, 1]]];
AppendTo[list, new]
,
{21 - 1}
];
list