Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Brilliant-numbers/Mathematica/brilliant-numbers.math
Normal file
11
Task/Brilliant-numbers/Mathematica/brilliant-numbers.math
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
ClearAll[PrimesDecade]
|
||||
PrimesDecade[n_Integer] := Module[{bounds},
|
||||
bounds = {PrimePi[10^n] + 1, PrimePi[10^(n + 1) - 1]};
|
||||
Prime[Range @@ bounds]
|
||||
]
|
||||
ds = Union @@ Table[Union[Times @@@ Tuples[PrimesDecade[d], 2]], {d, 0, 4}];
|
||||
|
||||
Multicolumn[Take[ds, 100], {Automatic, 8}, Appearance -> "Horizontal"]
|
||||
|
||||
sel = Min /@ GatherBy[Select[ds, GreaterEqualThan[10]], IntegerLength];
|
||||
Grid[{#, FirstPosition[ds, #][[1]]} & /@ sel]
|
||||
Loading…
Add table
Add a link
Reference in a new issue