Pierpont primes: Difference between revisions

m
No edit summary
Line 941:
</pre>
=={{header|Haskell}}==
Uses arithmoi Library: https://hackage.haskell.org/package/arithmoi-0.11.0.0 for prime generation and prime testing.
<lang haskell>import Control.Monad (guard)
import Data.List (intercalate)
Line 968:
pierpoints k = do
n <- nSmooth 3
let x = case k of First -> nsucc + 1n
Second -> pred n - 1
guard (isPrime x)
[x]
Line 1,006:
./pierpoints 0.04s user 0.01s system 20% cpu 0.215 total
</pre>
 
=={{header|Java}}==
<lang java>
Anonymous user