Section 1.5 Powers and Primitive Roots in Finite Fields
Find the multiplicative order of the number 7 modulo 11
M11 =Integers(11)
multiplicative_order(M11(7))
Get one of the generators of the of the multiplicative group. This is a primitive root of the field.
M11.multiplicative_generator()