[GAP Forum] A question

Joe Bohanon jbohanon2 at gmail.com
Mon Oct 26 15:27:39 GMT 2009


It doesn't work because the first group, the trivial group has order 1 
and "FactorsInt" returns "[1]". All the rest of the positive integers 
return what you want. Change [1..20] to [2..20].

Your program is also not going to output the Sylow subgroups as they are 
done within a "for" loop. I would recommend adding a line like

Sylows:=[];

above the first "for" loop,

Sylow:=[];

above the second "for" loop,

then

Add(Sylow,P);

in the second "for" loop,

and

Append(Sylows,Sylow);

in between the "od" statements.

As for why the code worked when you restricted the size from [1..20] 
it's because first off you are removing the group of order 1, and second 
because the smallest non-solvable group has order 60 so it's an empty list.

Joe

Áõ½¨¾ü wrote:
> Dear forum,
> I have written a simple GAP programme as follows:
>  
> A:=AllSmallGroups(Size,[1..20]);
> for i in [1..Size(A)] do
> G:=A[i];
> f:=FactorsInt(Size(G));
> F:=Union(f,f);
> for p in F do
> P:=SylowSubgroup(G,p);
> od;
> od;
> the following error is produced:
> Error, SylowSubgroup: <p> must be a prime called from
> <compiled or corrupted call value>  called from
> SylowSubgroup( G, p ) called from
> <function>( <arguments> ) called from read-eval-loop
> Entering break read-eval-print loop ...
> you can 'quit;' to quit to outer loop, or
> you can 'return;' to continue
> brk>
> If we replace "A:=AllSmallGroups(Size,[1..20])" by 
> "A:=AllSmallGroups(Size,[1..20],IsSolvable,false)", then this error doesn't appear.
>  
> I can not find the reason. How can I use the attribute "SylowSubgroup(G,p)" when G is solvable?
> Best Wishes.
> Jianjun Liu
>
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
>   



More information about the Forum mailing list