Skip to content

Instantly share code, notes, and snippets.

@dvberkel
Created April 9, 2012 12:45
Show Gist options
  • Select an option

  • Save dvberkel/2343197 to your computer and use it in GitHub Desktop.

Select an option

Save dvberkel/2343197 to your computer and use it in GitHub Desktop.
Magma code to determine possible candidates for Brands scheme for the Mammon project
p := 7; batchSize := 10;
for index in [1..batchSize] do
p := NextPrime(p);
phi := EulerPhi(p);
factors := Factorization(phi);
primitiveCount := EulerPhi(phi);
printf "%o, %o, %o\n", p, factors, primitiveCount;
end for;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment