Extensions of $SL(2,\mathbb{F}_q)$ Let $n = q(q^2-1)$ (the order of $SL(2,\mathbb{F}_q)$ I think).  How many groups of order $2n$ contain $SL(2,\mathbb{F}_q)$ as a (necessarily normal) subgroup?  Is this number known exactly?  Seems like it would be something well known, but maybe I slept through Group Theory class that day?
 A: I can give a complete answer to the question, but it is indeed a little delicate. For the moment I am not going to give much explanation, and there are places where I haven't got a completely formal proof of what happens.
We first distinguish the possible extensions by the outer automorphism of ${\rm SL}_2(q)$ induced by the external element. Let $q = p^e$ with $p$ prime. There are four possibilities for this outer automorphism:


*

*Trivial.

*Diagonal automorphism ($q$ odd only).

*Field automorphism ($e$ even only).

*Field $\times$ diagonal ($q$ odd and $e$ even).


In fact Case 4 does not occur. The first instance of this is $q=9$, where it is "well known" that there is no group with structure $2 ^. A_6 .2_3$ in the ATLAS notation.
For Case 1, there is a single isomorphism type of extensions (i.e. $C_2 \times {\rm SL}_2(q)$) when $q$ is even, and two isomorphism types (i.e. the direct product, and the central product of ${\rm SL}_2(q)$ with $C_4$), when $q$ is odd.
In Case 2, with $q$ odd, there are two isomorphism types of extensions. They both have $G/Z(G) \cong {\rm PGL}_2(q)$, and they can be distinguished by their Sylow $2$-subgroups. The first type has two conjugacy classes of elements of order $2$ and semidihedral Sylow $2$-subgroup, whereas the second type has a unique class of elements of order $2$ (the central element of the group) and generalized quaternion Sylow $2$-subgroups.
So this answers your question above for the case $q=p$ with $p$ odd. There are actually four isomorphism types of extensions in that case, two from case 1 and two from Case 2.
For Case 3 (field automorphisms of order $2$, with $e$ even), there is clearly a single isomorphism type of extensions, the semidirect product, when $q$ is even.
When $q$ is odd and $e$ is even, there appears to be again a unique isomorphism type, but this is less obvious. As in Case 2, there are two equivalence classes of extensions of $C_2$ by ${\rm PSL}_2(q).2$ in this case, but this time they are isomorphic as groups, and the two equivalence classes are interchanged by the diagonal automorphism of ${\rm PSL}_2(q)$.
A: The general classification of extensions $1 \to N \to G \to H \to 1$ with $N$ and $H$ fixed (which here are $N = \text{SL}_2(\mathbb{F}_q)$ and $H = \mathbb{Z}_2$) is that they correspond to equivalence classes of homomorphisms $H \to \mathbf{Aut}(N)$, where $\mathbf{Aut}(N)$ denotes the automorphism 2-group of $N$. 
This is the 2-group whose objects are automorphisms of $N$ and whose morphisms are natural transformations between these; explicitly, these are given by pointwise conjugation with elements of $N$. Its $\pi_0$ is the outer automorphism group $\text{Out}(N)$ and its $\pi_1$ is the center $Z(N)$. In particular: 


*

*If $Z(N) = 1$ then $\textbf{Aut}(N) \cong \text{Out}(N)$ and we get that extensions correspond to equivalence (which here means conjugacy) classes of homomorphisms $H \to \text{Out}(N)$.

*If $\text{Out}(N) = 1$ then $\textbf{Aut}(N) \cong B Z(N)$ and we get that extensions correspond to equivalence classes of homomorphisms $H \to BZ(N)$, which in turn are classified by second group cohomology $H^2(H, Z(N))$ with trivial action. 


Unfortunately, when $N = \text{SL}_2(\mathbb{F}_q)$ neither of these useful simplifying assumptions hold in general:


*

*The center $Z(N)$ consists of scalar multiples of the identity, hence is isomorphic to the group $\mu_2(\mathbb{F}_q)$ of square roots of unity in $\mathbb{F}_q^{\times}$. This is trivial if $q$ is even but has order $2$ if $q$ is odd.  

*The "projective general semilinear group" $\text{PGL}_2(\mathbb{F}_q) \rtimes \text{Gal}(\mathbb{F}_q/\mathbb{F}_p)$, where $\mathbb{F}_q$ has characteristic $p$, naturally acts on $N$, and some of this action survives to the outer automorphism group. (I believe, but am not sure how to prove, that in fact it surjects onto the outer automorphism group.)


So things look a bit delicate to me. In general, in order to classify homomorphisms $H \to \textbf{Aut}(N)$, you can do the following:


*

*First classify homomorphisms $H \to \text{Out}(N)$. 

*If $f : H \to \text{Out}(N)$ is a homomorphism, the obstruction to lifting it to a homomorphism $H \to \textbf{Aut}(N)$ is a class in third group cohomology $H^3(H, Z(N))$ given by the pullback of a universal class in $H^3(\text{Out}(N), Z(N))$ (the Postnikov invariant of $\textbf{Aut}(N)$) along $f$. Next, determine when the obstruction vanishes. 

*If the obstruction vanishes for some $f$, lifts of $f$ are classified by second group cohomology $H^2(H, Z(N))$ where the action of $H$ on $Z(N)$ is induced by $f$. Finally, compute all of these cohomology groups. 


As an insufficiently delicate person I will refrain from doing this except in the special case that $q = 2^n$ is even, so that the center vanishes. In this case the projective general and special linear groups coincide and I believe, but am not sure how to prove, that the outer automorphism group of $N = \text{SL}_2(\mathbb{F}_{2^n})$ is precisely 
$$\text{Gal}(\mathbb{F}_{2^n}/\mathbb{F}_2) \cong \mathbb{Z}_n.$$
If I'm right, then extensions are classified by homomorphisms $\mathbb{Z}_2 \to \mathbb{Z}_n$. There is one if $n$ is odd, corresponding to the trivial extension $\text{SL}_2(\mathbb{F}_{2^n}) \times \mathbb{Z}_2$, and two if $n$ is even, corresponding to the trivial extension and the semidirect product 
$$\text{SL}_2(\mathbb{F}_{2^n}) \rtimes \mathbb{Z}_2$$ 
where $\mathbb{Z}_2$ acts by conjugation by the unique nontrivial element of the Galois group of order $2$. 
