You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- =============================================================================
-- Exercise 6 (2) :: Time spent: +- 1 hour
-- Finding a list of mersenneprimes
-- Using the miller rabin primes, this is much faster than the algorithm using the normal prime
-- =============================================================================
exercise62 = do
putStr "Comparing first 10 mersenne primes: "
calculatedPrimes <- filterM (primeMR 1.(\x -> (2^x) - 1)) $ take 150 primes
let primeValues = map mersenne calculatedPrimes
print $ take 10 primeValues == take 10 knownMersennePrimes
putStrLn ""
-- | Known mersenne Numbers
knownMersennePrimes :: [Integer]
knownMersennePrimes = [ mers n | n <- [1..25]]
Report is incomplete.
No answer for the question:
Check whether the numbers that you found are genuine Mersenne primes.
6b (<-5)
7 (<-10)
The text was updated successfully, but these errors were encountered:
> Exercise 6 (1)
Exercise 6: Smallest number in J. Chernick's subset of carmichael numbers that passes Miller-Rabin
K = 1, minimum 'prime': 9624742921 can be divided by [1171,2341,3511], average value of primes found: 9624742921
K = 2, minimum 'prime': 1343656902505249 can be divided by [60727,121453,182179], average value of primes found: 1343656902505249
K = 5, minimum 'prime': 14199746960672563681 can be divided by [1332631,2665261,3997891], average value of primes found: 14199746960672563681
Clear structured code.
6a
Report incomplete
6a(<-7)
6b
Report is incomplete.
No answer for the question:
Check whether the numbers that you found are genuine Mersenne primes.
6b (<-5)
7 (<-10)
The text was updated successfully, but these errors were encountered: