Finding Primitive Roots
No simple general formula to compute primitive roots modulo n is known. There are however methods to locate a primitive root that are faster than simply trying out all candidates.
If the multiplicative order of a number m modulo n is equal to (the order of Zn×), then it is a primitive root. In fact the converse is true: If m is a primitive root modulo n, then the multiplicative order of m is . We can use this to test for primitive roots.
First, compute . Then determine the different prime factors of, say p1, ..., pk. Now, for every element m of Zn*, compute
using a fast algorithm for modular exponentiation such as exponentiation by squaring. A number m for which these k results are all different from 1 is a primitive root.
The number of primitive roots modulo n, if there are any, is equal to
since, in general, a cyclic group with r elements has generators.
If g is a primitive root modulo p, then g is a primitive root modulo all powers pk unless g p – 1 ≡ 1 (mod p2); in that case, g + p is.
If g is a primitive root modulo pk, then g or g + pk (whichever one is odd) is a primitive root modulo 2pk.
Finding primitive roots modulo p is also equivalent to finding the roots of the (p-1)th cyclotomic polynomial modulo p.
Read more about this topic: Primitive Root Modulo n
Famous quotes containing the words finding, primitive and/or roots:
“I do not know what I may appear to the world; but to myself I seem to have been only like a boy playing on the seashore, and diverting myself in now and then finding a smoother pebble or a prettier shell than ordinary, whilst the great ocean of truth lay all undiscovered before me.”
—Isaac Newton (16421727)
“Cannibalism to a certain moderate extent is practised among several of the primitive tribes in the Pacific, but it is upon the bodies of slain enemies alone; and horrible and fearful as the custom is, immeasurably as it is to be abhorred and condemned, still I assert that those who indulge in it are in other respects humane and virtuous.”
—Herman Melville (18191891)
“If the national security is involved, anything goes. There are no rules. There are people so lacking in roots about what is proper and what is improper that they dont know theres anything wrong in breaking into the headquarters of the opposition party.”
—Helen Gahagan Douglas (19001980)