Created
April 13, 2012 11:58
-
-
Save dvberkel/2376358 to your computer and use it in GitHub Desktop.
Magma code to determine Sophie Germain primes, which are excellent candidates for Brands scheme for the Mammon project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bits := 32; batchSize := 100; | |
| maxQ := -1; | |
| for index in [1..batchSize] do | |
| q := RandomPrime(bits - 1); | |
| if q gt maxQ and IsPrime(2*q + 1) then | |
| maxQ := q; | |
| print 2*q + 1, q; | |
| end if; | |
| end for; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment