Find largest left truncatable prime in a given base: Difference between revisions

m
→‎{{header|Haskell}}: result up to 21; wash my hands
(→‎{{header|Perl 6}}: more explanation of the choice of 1 try for Miller-Rabin)
m (→‎{{header|Haskell}}: result up to 21; wash my hands)
Line 79:
addDigit a = filter (is_prime [3]) $ map (a*b+) x
 
main = mapM_ print $ map (\x->(x, left_trunc x)) [3..2021]</lang>
<pre>
(3,23)
Line 98:
(18,571933398724668544269594979167602382822769202133808087)
(19,546207129080421139)
(20,1073289911449776273800623217566610940096241078373)
(21,391461911766647707547123429659688417)
</pre>
 
Anonymous user