If I only want to calculate the number of groups of order $n$ for large $n$ , especially cubefree $n$ :

Is there a small version available or an online calculator ? Or do I simply have to download the whole GAP-software ?

The Magma-Online-Calculator does not support large cubefree orders. I found some useful applets, but they only support very small groups. I do not want to generate the large groups, I only want to determine the number of groups of a given order.

  • $\begingroup$ Thanks - this splits into several questions: is there an online GAP calculator; is there a precomputed list of numbers of small groups of order $n$ for some larger $n$; can we have a computational service calculating these numbers of demand. I will think of possible answer(s). $\endgroup$ Dec 9, 2015 at 19:08
  • 2
    $\begingroup$ GAP is really not that huge by modern standards, and there are packages for many operating systems. If you start now you'll probably have it downloaded and installed before you get an answer to this question. $\endgroup$ Dec 9, 2015 at 19:30
  • $\begingroup$ It takes me about 5 - 10 minutes to download and install GAP. $\endgroup$
    – Derek Holt
    Dec 10, 2015 at 10:06
  • 1
    $\begingroup$ The SmallGroups package in Magma does not contain the groups of cube-free order greater than 2000. $\endgroup$
    – user298006
    Dec 12, 2015 at 0:39
  • 1
    $\begingroup$ I could wrap a custom archive with the core GAP system (including Windows binaries) and GAPDoc package only - minimal set of what you need to run GAP. My estimation would be around 40-50 MB. It will include Small Groups Library so you will be able to use it without internet connection at all. It could be probably made twice smaller without Small Groups Library but then you will have to use SCSCP package as in my update to the answer. The third alternative would be to have a small standalone simplistic SCSCP client for NrSmallGroups only - it depends on what else can you run. What about Python? $\endgroup$ Dec 13, 2015 at 22:15

2 Answers 2


I do not have access to Magma, so I do not now how exactly the Small Groups Library in Magma differs from the one in GAP, and whether missing orders that you observe using the online calculator are limitations of the online calculator or are also missing in a proper Magma installation.

As a test case, I've tried $n=3 \cdot 17^2 \cdot 25= 21675$ and Magma online calculator returns Runtime error: The groups of order 21675 are not contained in the small groups database. In GAP, NrSmallGroups(n) unsurprisingly returns 9, matching Small Groups Library page which says that it contains groups of cubefree order at most 50 000 (395 703 groups).

There is no GAP online calculator, at least at the moment, but you may try to access GAP via SageMathCloud. I've just tried to open terminal there and called gap. This started GAP 4.7.8 with some selection of packages (which is however smaller than in the GAP installation from sources downloaded from the GAP website and fully compiled, i.e. with packages that require compilation, so your mileage may vary. Of course you may install extra packages or even install your own full copy of GAP there, but then you would have to maintain it yourself). Also, SageMathCloud suggests to consider subscription since "projects running on free servers compete for resources with a large number of other free users".

Hope this helps to create a setup which works well for you, perhaps using a combination of working with local GAP installation when you can, and with SageMathCloud when you are travelling with internet connection.

Update: GAP package SCSCP implements remote procedure call protocol, also called SCSCP. Using this protocol, SCSCP-compliant computer algebra systems (and other compliant software) can communicate with each other.

NrSmallGroups has been just added to the list of procedures provided by the demo server, so now (important! if IO package is compiled and SCSCP package is loaded) one could read into GAP the following auxiliary function

NrSmallGroupsRemote := n -> EvaluateBySCSCP( "NrSmallGroups", [n],

and then use it as follows:

gap> NrSmallGroupsRemote(24);
gap> List([1024,1536,21675],NrSmallGroupsRemote);
[ 49487365422, 408641062, 9 ]

If you will ask for the order where no information is available, you will get an error message, for example:

gap> NrSmallGroupsRemote(2048);
Error, chrystal.mcs.st-andrews.ac.uk. reports : 
  the library of groups of size 2048 is not available
  cd := "scscp1",
  name := "error_system_specific" ) called from

For cube-free groups of order greater than 50000, the GAP SCSCP server now provides two functions from the CubeFree package: NumberCFGroups and NumberCFSolvableGroups. You can call them remotely as follows (after LoadPackage("scscp");)

gap> EvaluateBySCSCP("NumberCFGroups",[50231],
> "chrystal.mcs.st-andrews.ac.uk",26133);
rec( attributes := [ [ "call_id", "chrystal.mcs.st-andrews.ac.uk." ] ],
object := 1 )


gap> EvaluateBySCSCP("NumberCFSolvableGroups",[50234],
> "chrystal.mcs.st-andrews.ac.uk",26133);
rec( attributes := [ [ "call_id", "chrystal.mcs.st-andrews.ac.uk." ] ],
object := 2 )

The number of the groups is the object component of the returned record, the rest is technical information that may be ignored.

So in theory one could have a minimalistic GAP installation with stripped off data libraries and only 4 packages: GAPDoc, IO, OpenMath and SCSCP, which will do the job.

However, SCSCP is a protocol implemented in several systems and languages - see the list of compatible tools here, so it's completely plausible that instead of GAP you may have e.g. a short Python script that will perform only a single purpose - contact GAP SCSCP server sending one integer (the order of a group) and getting back another integer (the number of groups of these order) or an error message.


Most likely you will have to run sufficiently much of the whole software -- many ``isolated'' calculations end up relying on other tasks (such as orbits under an automorphism group) that utilize a substantial amount of the system -- to make as stripped down version ineffective.

I am not aware of an online version of GAP. Given that the system can access arbitrary files it would be a fair amount of work to ensure such a service was safe for the hosting computer.

Could one create either of these tools? Possibly. Would it be worth someone's time to do so, given the payoff? In my personal view: no.


You must log in to answer this question.

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