I need a GAP code for checking the following question

Let $n$ be a given positive integer. Is it true that every group $G$ of order $n$ is either solvable or satisfies the condition: "For any positive divisor $d$ of $n$ there exists a subgroup of $G$ with order $d$ or $n/d$"?

We know that all $n<240$ satisfy the above property. So, the first interested number is $n=240$. Indeed, we are looking for a natural number $n$ which does not have the above property.

Any advice?

Thanks in advance


1 Answer 1


I hope the following brute force code answers your question:

for n in [240..nmax] do
     if IsPrime(n) then continue; fi;    
     for g in gl do    
          if IsSolvableGroup(g) then continue; fi;         
          if not ForAll(div, d->d in szs or n/d in szs) then 

It is possible to add a break statement after the Display if only one example is wanted.


There seems to be an exception : The group PSL(2,8) is not solvable and lacks subgroups of order $12, 21, 24, 28, 36, 42, 63, 72, 84, 126, 168, 252$. The question that rises now is :"Could one have predicted this result on theoretical grounds?".

  • $\begingroup$ Dear Nimda, many thanks for your answer. Since I'm not familiar to the GAP, would you tell me: 1. Is the second od; necessary at the end 2. what is the break statement after the Display, exactly? 3. Did you run it for n=240 (true or false)? $\endgroup$ Oct 7, 2014 at 12:40
  • 1
    $\begingroup$ Thanks! Please also note that there are several ways to improve this: 1. Call ConjugacyClassesSubgroups(g) without the lattice of subgroups since we're not interested in inclusions. 2. Use SmallGroup(m,n) instead of generating full list of groups of a given order. 3. Don't test groups for which solvability follows from their order, like $p$-groups and groups of odd order. 4. Have a modular code with three layers: test one group; test all groups of a given order; test all groups from a range of orders. It's a common search problem, and it will be easy to plug different functions there. $\endgroup$ Oct 7, 2014 at 14:03
  • 1
    $\begingroup$ ! Interesting ! The first answer is [ 504, 156 ]. 504 is the given number $n$, what is 156? $\endgroup$ Oct 7, 2014 at 18:09
  • 2
    $\begingroup$ Use the GAP command G:=SmallGroup(504,156);StructureDescription(G); and you will get a fair description of the group. $\endgroup$ Oct 7, 2014 at 19:30
  • 2
    $\begingroup$ If you want to see the result for all the groups of order $504$ put an # before the line $\mathtt{if\ IsSolvableGroup(g)}$. $\endgroup$ Oct 8, 2014 at 17:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .