abstract-algebra

Python: finding all generators for a cyclic group

Python: finding all generators for a cyclic group Question: Take a cyclic group Z_n with the order n. The elements are: Z_n = {1,2,…,n-1} For each of the elements, let us call them a, you test if a^x % n gives us all numbers in Z_n; x is here all numbers from 1 to n-1. …

Total answers: 2