Created
April 10, 2012 09:57
-
-
Save dvberkel/2349984 to your computer and use it in GitHub Desktop.
Magma code to determine possible candidates for Brands scheme for the Mammon project in a random fasion
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; | |
p := -1; maxQ := -1; | |
for i in [1..batchSize] do | |
p := RandomPrime(bits); | |
phi := EulerPhi(p); | |
factors := Factorization(phi); | |
q, _ := Max([factor[1] : factor in factors]); | |
primitiveCount := EulerPhi(phi); | |
if (q gt maxQ) then | |
maxQ := q; | |
printf "%o, %o, %o\n", p, factors, primitiveCount; | |
end if; | |
end for; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment