Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,43 @@
|
|||
ClearAll[Unprimeable]
|
||||
Unprimeable[in_Integer] := Module[{id, new, pos},
|
||||
id = IntegerDigits[in];
|
||||
pos = Catenate@Table[
|
||||
Table[
|
||||
new = id;
|
||||
new[[d]] = n;
|
||||
new
|
||||
,
|
||||
{n, 0, 9}
|
||||
]
|
||||
,
|
||||
{d, Length[id]}
|
||||
];
|
||||
pos //= Map[FromDigits];
|
||||
NoneTrue[pos, PrimeQ]
|
||||
]
|
||||
res = {};
|
||||
PrintTemporary[Dynamic[{Length[res], i}]];
|
||||
i = 0;
|
||||
While[Length[res] < 600,
|
||||
If[Unprimeable[i],
|
||||
AppendTo[res, i]
|
||||
];
|
||||
i++
|
||||
];
|
||||
|
||||
PrintTemporary[Dynamic[{lastdig, i}]];
|
||||
out = Table[
|
||||
i = lastdig;
|
||||
While[! Unprimeable[i],
|
||||
i += 10
|
||||
];
|
||||
i
|
||||
,
|
||||
{lastdig, 0, 9}
|
||||
];
|
||||
|
||||
res[[;; 35]]
|
||||
res[[600]]
|
||||
|
||||
lastdigit = IntegerDigits /* Last;
|
||||
Print["Least unprimeable number ending in ", lastdigit[#], ": ", #] & /@ SortBy[out, lastdigit];
|
||||
Loading…
Add table
Add a link
Reference in a new issue