Primitive Root Modulo n - Finding Primitive Roots

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:

    Scarlett O’Hara: Oh, oh, Rhett. For the first time I’m finding out what it is to be sorry for something I’ve done.
    Rhett Butler: Dry your eyes. If you had it all to do over again, you’d do no differently. You’re like the thief who isn’t the least bit sorry he stole, but he’s terribly, terribly sorry he’s going to jail.
    Sidney Howard (1891–1939)

    Every modern male has, lying at the bottom of his psyche, a large, primitive being covered with hair down to his feet. Making contact with this Wild Man is the step the Eighties male or the Nineties male has yet to take. That bucketing-out process has yet to begin in our contemporary culture.
    Robert Bly (b. 1926)

    Now fades the lasts long streak of snow,
    Now burgeons every maze of quick
    About the flowering squares, and thick
    By ashen roots the violets blow.
    Alfred Tennyson (1809–1892)