By Euler criterion,
Choose a primitive root . For any integer not divisible by ,
For , the exponent satisfies . Therefore
Together with part (i), this is the weighted complete Legendre-symbol sum.
The residue is a primitive root modulo . Choose
Writing gives , so one may take
Its Chinese-remainder components have orders and , hence its order modulo is .
A primitive root modulo is a unit of order ; a nonzero quadratic residue modulo an odd prime is a square.
If a primitive root modulo were , then its order would divide , the order of the subgroup of squares, contradicting .
Modulo , has order , so the primitive roots are for :
Finally , so the lifting criterion makes primitive modulo . It is plainly the smallest possible positive primitive root.