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
--ex5 (45 min)
carmichael :: [Integer]
carmichael = [ (6*k+1)*(12*k+1)*(18*k+1) |
k <- [2..],
prime (6*k+1),
prime (12*k+1),
prime (18*k+1)]
-- Al tested Carmichael numbers test true with Fermats primality test.
-- Carmichael numbers have the property we test with Fermats little theorem,
-- namely that if p is a prime number, then for any int b, the number b^p - b
-- is an int multiple of p.
Unclear report.
Why not taking k=1.
The question was what is the minimal Carmichael number which fools the test.
Exercise 6.
The following is a wrong conclusion.
The definition of ex6 must be parametrized by k. k=1,2,3.
-- All tested Carmichael numbers test false with MR primality test.
-- MR weeds out (most) Carmichael numbers because it also tests for a
-- non-trivial root of unity.
-- https://cs.stackexchange.com/questions/21462/why-miller-rabin-instead-of-fermat-primality-test
ex6 :: IO()
ex6 = ex6' carmichael
ex6' :: [Integer] -> IO()
ex6' (x:xs) = do
print(x)
res <- primeMR 10 x
print(res)
ex6' xs
The text was updated successfully, but these errors were encountered:
Unclear report.
Why not taking
k=1
.The question was what is the minimal Carmichael number which fools the test.
Exercise 6.
The following is a wrong conclusion.
The definition of
ex6
must be parametrized byk
.k=1,2,3
.The text was updated successfully, but these errors were encountered: