It's better to use the conjugacy classes first as GAP will have a hard (or impossible) time doing this when n>=10.
ccls:=ConjugacyClasses(SymmetricGroup(n)); 2ccls:=Filtered(ccls,i->Order(Representative(i))=2); Concatenation(List(2ccls,Elements)); Joe On Tue, Nov 17, 2009 at 3:42 PM, <a...@gursey.gov.tr> wrote: > This will do: > > Filtered( Elements( SymmetricGroup( 4 ) ), elt -> ( Order(elt) = 2 ) ); > > k. > > > Quoting yalin...@gazi.edu.tr: > > >> Dear Forum, >> >> I am very new in GAP and my question may be very easy: >> >> Is it possible to collect the elements of the same order in a group? For >> example the elements of order two in S_n, the symmetric group of n >> elements. >> >> All the best, >> >> Aynur Arikan >> >> _______________________________________________ >> Forum mailing list >> Forum@mail.gap-system.org >> http://mail.gap-system.org/mailman/listinfo/forum >> >> > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > > > _______________________________________________ > Forum mailing list > Forum@mail.gap-system.org > http://mail.gap-system.org/mailman/listinfo/forum > _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum