Truncatable primes: Difference between revisions
m
Regularize non-standard header markup
(Added Swift solution) |
Thundergnat (talk | contribs) m (Regularize non-standard header markup) |
||
Line 1,568:
998443</lang>
==
<lang Icon>procedure main(arglist)
N := 0 < integer(\arglist[1]) | 1000000 # primes to generator 1 to ... (1M or 1st arglist)
Line 1,608:
Largest right truncatable prime = 739399</pre>
==
Truncatable primes may be constructed by starting with a set of one digit prime numbers and then repeatedly adding a non-zero digit (combine all possibilities of a truncatable prime digit sequence with each digit) and, at each step, selecting the prime numbers which result.
Line 2,742:
MessageRequester("Truncatable primes",x+#CRLF$+y)</lang>
==
<lang python>maxprime = 1000000
|