The groups of order one and two have the same number of elements as subgroups. The alternating group $A_5$ has 60 elements but alas only 59 subgroups. What are some other finite groups with as many elements as subgroups? I realize that this question has no mathematical significance whatsoever, but I find it interesting.
-  4$\begingroup$ You could also ask about conjugacy classes of elements and conjugacy classes of subgroups. $\endgroup$Sam Hopkins– Sam Hopkins ♦2025-06-06 20:20:59 +00:00Commented Jun 6 at 20:20
 -  8$\begingroup$ Well $S_3$ does have six elements and six subgroups. Some small examples where the number of elements is the number of subgroups: $C_1$, $C_2$, $S_3$, $C_2 \times C_4$, $D_{28}$, $C_6 \times S_3$. With a computer we find that there are $13$ such examples with $|G| \leq 100$, up to isomorphism. $\endgroup$testaccount– testaccount2025-06-06 20:27:26 +00:00Commented Jun 6 at 20:27
 -  6$\begingroup$ To anyone whose suspects that $D_6=S_3, D_{28}$ imply that $D_n$ works for $n$ an even perfect number: The pattern stops after that, since the number of subgroups of $D_n$ is the sum of all divisors (not necessarily proper) of $n/2$ plus the number of divisors (not necessarily proper) of $n/2$. For $n=2^{p-1} (2^p-1)$, with $2^p-1$ prime an even perfect number, the only proper divisor of $n$ that is not a divisor of $n/2$ is $2^{p-1}$, while the number of divisors of $n/2$ is $2(p-1)$, and these agree if and only if $p=2,3$ which gives the two examples found by testaccount. $\endgroup$Will Sawin– Will Sawin2025-06-06 20:39:00 +00:00Commented Jun 6 at 20:39
 -  4$\begingroup$ $D_{104}$ is another dihedral group that works $\endgroup$Francesco Polizzi– Francesco Polizzi2025-06-06 20:53:24 +00:00Commented Jun 6 at 20:53
 -  13$\begingroup$ More generally, OEIS sequence A083874 lists the dihedral groups that work. $\endgroup$Peter Kagey– Peter Kagey2025-06-06 21:01:00 +00:00Commented Jun 6 at 21:01
 
1 Answer
According to Magma, the following are the groups with order less than $256$ satisfying the condition:
SmallGroup$(i,j)$ with $(i,j)$ equal to $(1,1)$, $(2,1)$, $(6,1)$, $(8,2)$, $(28,3)$, $(36,12)$, $(40,8)$, $(40,12)$, $(48,17)$, $(54,5)$, $(72,47)$, $(96,68)$, $(100,12)$, $(104,6)$, $(128,10)$, $(128,15)$, $(128,31)$, $(128,33)$, $(128,143)$, $(128,835)$, $(132,5)$, $(144,72)$, $(160,27)$, $(160,32)$, $(160,41)$, $(160,100)$, $(160,122)$, $(160,128)$, $(160,172)$, $(176,32)$, $(180,22)$, $(192,56)$, $(192,188)$, $(192,193)$, $(192,279)$, $(192,624)$, $(216,140)$, $(240,21)$, $(240,27)$, $(240,78)$, $(240,120)$, $(240,121)$, $(240,169)$, $(252,26)$.
I have to admit that I can't see much of a pattern to this, except that there are more than I would have expected. The sequence of orders is not in OEIS.
Edit: The sequence is in OEIS, but either Magma or sequence A368538 seems to have a mistake. The sequence misses out $36$. The group SmallGroup$(36,12)$ has $36$ subgroups, according to Magma. I'm using the command #AllSubgroups(SmallGroup(36,12)).
[Note: The sequence has now been corrected! Thanks go to Hugo Pfoertner.]
To respond to the question of Corentin B, all the groups in the above list are abelian or metabelian, but this pattern does not continue. SmallGroup$(720,545)$, $(960,6263)$, $(1008,895)$, $(1440,4717)$ are examples of derived length three. I do not know whether there are non-soluble examples, but it seems to me quite likely that there are; they may be quite large.
-  2$\begingroup$ Can we say that groups appearing are almost abelian (i.e., we can always find an abelian subgroup with the index uniformly bounded)? For all the examples given in the comments above, the index is at most 2, how about the examples in this list? $\endgroup$Corentin B– Corentin B2025-06-07 08:32:23 +00:00Commented Jun 7 at 8:32
 -  1$\begingroup$ oeis.org/A368538 has been corrected accordingly. The Magma program specified there returns also the term 36. It seems very unlikely that Magma would produce an incorrect result. Thanks for the observation! $\endgroup$Hugo Pfoertner– Hugo Pfoertner2025-06-10 11:01:27 +00:00Commented Jun 10 at 11:01
 -  $\begingroup$ @HugoPfoertner Thanks for doing that. I appreciate it. $\endgroup$Dave Benson– Dave Benson2025-06-10 11:18:56 +00:00Commented Jun 10 at 11:18
 -  2$\begingroup$ Hand calculations seem to show that $S_3 \times {\mathbb Z}_6$ has $36$ subgroups. This group, along with all dihedral groups, has a normal $2$-complement. For several of the numbers $n$ on the OEIS list, one can see quickly that every group of order $n$ has a normal $2$-complement. I wonder about the other groups found using Magma. $\endgroup$John Shareshian– John Shareshian2025-06-10 12:18:18 +00:00Commented Jun 10 at 12:18
 -  2$\begingroup$ We now also have a new OEIS sequence A384800 for the number of groups corresponding to the orders given in A368538. $\endgroup$Hugo Pfoertner– Hugo Pfoertner2025-06-10 16:39:38 +00:00Commented Jun 10 at 16:39