TITLE: How many conjugacy classes of subgroups does GL(2,p) have?
QUESTION [14 upvotes]: How many conjugacy classes of subgroups does $\mathrm{GL}(2,p)$ have?

For instance the dihedral group of order $2n$ has $\tau(n)$ cyclic normal subgroups and $\sigma(n)$ "dihedral" subgroups (as in, containing a reflection), but they fall into $\gcd(2,n) \tau(n) + \tau(n/\gcd(2,n))$ conjugacy classes. Here $\tau(n)$ is the number of divisors of $n$, and $\sigma(n)$ is their sum.
The formula is relatively compact and can be explicitly evaluated for $n$ in the millions without much work.  The description is nice because it even indicates the structure of the subgroups.
The subgroups of $\mathrm{GL}(2,p)$ whose order is divisible by $p$ either have a normal Sylow $p$-subgroup or contain $\mathrm{SL}(2,p)$.  The former types have conjugacy classes indexed by the subgroups of $(p-1) × (p-1)$, and the latter by subgroups of $(p-1)$.  The number of the first type has some reasonable formulas at OEIS: A060724 and the latter is just $\tau(p-1)$ again.
Again the description is compact and can be explicitly evaluated for numbers into the millions without any real effort: $\mathrm{GL}(2,1000003)$ has $1000008$ conjugacy classes of subgroups of order divisible by $1000003$ and $\mathrm{GL}(2,10000019)$ has $10000024$ conjugacy classes of subgroups of order divisible by $10000019$, each number computed in under 1ms.  Again the description is especially nice because it even indicates the structure of the subgroups.

What about the conjugacy classes of subgroups of $\mathrm{GL}(2,p)$ whose order is coprime to $p$?

Is there a similarly compact and easily evaluated description of their number, and even more nicely, does it also indicate the structure of the subgroups?

REPLY [4 votes]: Another way to look at these is that there are three kinds of subgroup: those which contain 
a trivial Sylow $p$-subgroup, those which contain exactly one Sylow subgroup of order $p,$ ad those which contain more than one Sylow $p$-subgroup. The last type is easy to deal with: any such subgroup contains all $p+1$ Sylow $p$-subgroups of ${\rm GL}(2,p,$ so contains ${\rm SL}(2,p)$ (and is, in particular, normal). Every subgroup between ${\rm SL}(2,p)$ and ${\rm GL}(2,p)$ occurs, and the number  (of conjugacy classes of) such subgroups is the number of divisors of $p-1.$ The second type is also reasonably straightforward: any such subgroup is conjugate to one and only one subgroup of the group of invertible upper triangular matrices and that group of upper triangular matrices contains all upper unitriangular matrices. The first type consists of subgroups of order prime to $p.$ Since matrix representations over finite fields which are conjugate over an extension field are already conjugate over the field of realizability, the conjugacy class of such a group is uniquely determined by its Brauer character. The isomorphism types which can occur are described already in earlier answers.