# GAP:SylowSubgroup

## Definition

### Function type

The SylowSubgroup function takes as input a group and a number and outputs a group.

### Behavior

The behavior as follows:

• If the group is a finite group and the number input is a prime number, the function outputs one of the Sylow subgroups for that prime in the group. Note that if the prime does not divide the order of the group, the trivial group is returned.
• If the number input is not a prime number, GAP returns an error beginning with:
`<p> must be a prime called from`

## Examples of usage

Here is an example involving the computation of a 2-Sylow subgroup of symmetric group of degree six:

```gap> G := SymmetricGroup(6);
Sym( [ 1 .. 7 ] )
gap> S := SylowSubgroup(G,2);
Group([ (1,2), (3,4), (1,3)(2,4), (5,6) ])
gap> IdGroup(S);
[ 16, 11 ]
gap> IsomorphismGroups(S,DirectProduct(DihedralGroup(8),CyclicGroup(2)));
[ (1,2), (3,4), (1,3)(2,4), (5,6) ] -> [ f1*f2, f1*f2*f3, f1*f3*f4, f4 ]
gap> N := Normalizer(G,S);
Group([ (5,6), (1,4)(2,3), (3,4), (1,2) ])
gap> N = S;
true
gap> Length(ConjugateSubgroups(G,S));
45
gap> T := SylowSubgroup(G,3);
Group([ (1,2,3), (4,5,6) ])
gap> IdGroup(T);
[ 9, 2 ]
gap> U := SylowSubgroup(G,5);
Group([ (1,2,3,4,5) ])
gap> IdGroup(U);
[ 5, 1 ]```