Number of groups of prime power order

John Baez left a comment on my post on group statistics saying

It’s known that the number of groups of order p^n for prime p is p^{2n^3/27+O(n^(8/3))}. It might be fun to compare this to what Mathematica says.

Here goes. First let’s let p = 2. Mathematica’s FiniteGroupCount function tops out at n = 10. And for the range of values Mathematica does support, 2^{2n^3/27} grossly overestimates the number of groups.

    Table[{FiniteGroupCount[2^n], 2^((2./27) n^3)}, {n, 1, 11}]

    {{1, 1.05269}, {2, 1.50795}, {5, 4.}, {14, 26.7365}, 
    {51, 612.794}, {267, 65536.}, {2328, 4.45033*10^7}, 
    {56092, 2.61121*10^11}, {10494213, 1.80144*10^16}, 
    {49487365422, 1.98847*10^22}, {FiniteGroupCount[2048], 4.7789*10^29}}

OEIS has entries for the sizes of various groups, and the entry for powers of 2 confirms the asymptotic formula above. Maybe it’s not a good approximation until n is very large. (Update: Here’s a reference for the asymptotic expression for all p.)

The OEIS entry for number of groups of order powers of 5 has an interesting result:

For a prime p >= 5, the number of groups of order p^n begins 1, 1, 2, 5, 15,
61 + 2*p + 2*gcd (p – 1, 3) + gcd (p – 1, 4),
3*p^2 + 39*p + 344 + 24*gcd(p – 1, 3) + 11*gcd(p – 1, 4) + 2*gcd(p – 1, 5), …

We can duplicate this with Mathematica.

    Table[FiniteGroupCount[5^n], {n, 0, 6}]

    {1, 1, 2, 5, 15, 77, 684}

and the last two numbers match the calculations given in OEIS.

There’s something interesting going on with Mathematica. It doesn’t seem to know, or agree with, the formula above for groups of order p4. For example,

    Table[FiniteGroupCount[7^n], {n, 0, 6}]

    {1, 1, 2, 5, FiniteGroupCount[2401], 83, 860}

I get similar results when I use larger primes: it can’t handle the fourth power.

    Table[FiniteGroupCount[389^n], {n, 0, 6}]

    {1, 1, 2, 5, FiniteGroupCount[22898045041], 845, 469548}

The results for n = 5 and 6 agree with OEIS.

Is OEIS wrong about the number of groups of order  p4 or should Mathematica simply return 15 but there’s a gap in the software?

Also, does anybody know why the agreement with the asymptotic formula above is so bad? It’s just as bad or worse for other primes that I tried.

More algebra posts

4 thoughts on “Number of groups of prime power order

  1. Just looking at that formula, it doesn’t seem like you should expect it to give a “good” approximation. The big-oh term has a power of 8/3, compared to 3 for the leading term (so you wouldn’t expect it to be that small for the values of n you’re looking at, even if the constant in the big-oh term is not astronomically large), and, more importantly, it’s in the exponent. In other words, the ratio of the logarithms approaches 1, although probably slowly, but the actual ratio of FiniteGroupCount to the approximation might not even approach 1 at all.

  2. Including the big-oh term would make the upper bound even worse. The estimate is already off by several orders of magnitude without it. So unless I’m missing something, the expression has no practical utility.

  3. Yes, the number of groups of order p^4 is 15 unless p=2. I suspect it was accidentally overlooked in Mathematica.

  4. If my understanding of the notation is correct, the big-oh term is an error term which could be either positive or negative, much like writing sin(x) = x + O(x^3) for x close to 0. In the examples in this post, it is clearly negative. The bound you get from this formula is a very weak bound, but it is at least a bound, which is better than nothing.

Comments are closed.