Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab 6 #6

Open
BertLisser opened this issue Oct 22, 2018 · 0 comments
Open

Lab 6 #6

BertLisser opened this issue Oct 22, 2018 · 0 comments

Comments

@BertLisser
Copy link

--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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant