Related to A000679 (Number of groups of order $2^n$), how many nonAbelian groups of order $2^n$ are there?

It is true that there is no known formula for the number of isomorphism classes of groups of order $n$, but there is a very nice asymptotic formula for $p$groups. In particular, the number of isomorphism classes of groups of order $p^n$ grows as $p^{\frac{2}{27}n^3 + O(n^{8/3})}$. This function grows very rapidly, and there is a folklore conjecture that "almost all groups are $2$groups." 


It is as Qiaochu Yuan says, and worse: the number of abelian groups of order 2^n are not complicated. They are direct products of cyclic groups of order 2^m. The number of nonabelian groups is unknown. We don't actually have a formula. We just have exhaustive analyses for a few small values of n. 


Marshall Hall and James Senior published a book The Groups of order 2^{n} (n <= 6) in the 1960's. It's in the common room in the math department here at UCSB. Using rather obscure notation it arranges the conjugacy classes into lattices. Online you can find a list of all groups of order 64. 


I don't think there's a general method of approaching this.There are several methods of obtaining all the Abelian groups of order n for specific nsuch as the finite groups of prime order are all cyclic and therefore Abelian,etc. Unless n is very large,proceeding in this manner will usually get the number of groups down to a managable size and what remains should be nonAbelian. I think that's the best you can do unless you want to add the condition that the remaining groups are simplein which case,a Sylow analysis would be appropriate and would considerably simplify things. There are a few general results on nonAbelian groupslike a finite group G is nonAbelian if there are 2 elements in G whose commutator is nontrivial i.e. not the identity. But I don't know if you can use these kinds of results to get the kind of general formula you wantI don't think you can,although I could be wrong on this. The best discussions I know of such matters can be found in Herstien's Topics in Algebra,2nd edition and I.Martin Issacs' Finite Group Theory. 

