Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use the method CyclicPermutationGroup(n). This will create a cyclic group of given order. Then you can apply all the usual group-theory methods, e.g.

sage: G = CyclicPermutationGroup(8)
sage: G.is_cyclic()
True
sage: genG = G.gen()
sage: genG 
(1,2,3,4,5,6,7,8)

One problem is, that the elements are now represented as permutations and not in the "usual way" as integers $0,...,n-1$. However, if you want the element in $G$ which corresponds to $i \in \mathbb{Z}_n$ you can use genG^i.