I just ran across `FiniteGroupData`

and related functions in Mathematica. That would have made some of my earlier posts easier to write had I used this instead of writing my own code.

Here’s something I find interesting. For each *n*, look at the groups of order at most *n* and count how many are Abelian versus non-Abelian. At first there are more Abelian groups, but the non-Abelian groups soon become more numerous. Also, the number of Abelian groups grows smoothly, while the number of non-Abelian groups has big jumps, particularly at powers of 2.

Here’s the Mathematica code:

fgc = FoldList[Plus, 0, Table[FiniteGroupCount[n], {n, 1, 300}]] fga = FoldList[Plus, 0, Table[FiniteAbelianGroupCount[n], {n, 1, 300}]] ListLogPlot[ {fgc - fga, fga }, PlotLegends -> {"Non-Abelian", "Abelian"}, Joined -> True, AxesLabel -> {"order", "count"}]

I see the plot legend on my screen, but when saving the plot to a file the legend wasn’t included. Don’t know why. (Update: See footnote [1]). The jagged blue curve is the number of non-Abelian groups of size up to *n*. The smooth gold curve is the corresponding curve for Abelian groups.

Here’s the same plot carried out further to show the jumps at 512 and 1024.

## More group theory posts

[1] Someone from Wolfram Research saw this post and sent me a fix:

pl = ListLogPlot[...] Export["~/Desktop/img.png", pl]

I guess it’s like Tolstoy’s comments about happy families: there are many different ways to be non-abelian, but really only one way to be abelian.

So the latter is a smooth, permutation-based plot, and the former is… unpredictable.

Can I make comments in TeX?

Assuming not, I’ll use pseudo-TeX. 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.

The biggest jumps in your blue curve will occur at powers of 2. I’m not sure if the second biggest ones will occur mainly at powers of 3, or more general products of powers of 2 and powers of 3. I don’t know a formula for the approximate number of groups of order p^m q^n for primes p and q.