Anonymous user
Smarandache prime-digital sequence: Difference between revisions
m
→{{header|Haskell}}
Line 667:
smarandache = [2,3,5,7] <> s [2,3,5,7] >>= \x -> guard (isPrime x) >> [x]
where
nextSPDSTerms :: [Int] -> [(String, String)]
Line 687:
mapM_ (uncurry (printf "The %8sth SPDS: %15s\n")) $
nextSPDSTerms [100, 1_000, 10_000, 100_000]
▲ f = show . take 25</lang>
{{out}}
<pre>
|