Show that the number of nonisomorphic finite groups of order $n$ is at most $n^{n^2}.$ I have a question. I am supposed to prove the following theorem:
Let $n \in \mathbb{N}$ be a natural number. 
Show that:
the number of nonisomorphic groups of order $n$ is less than or equal to $n^{n^2}$.
My reasoning:
A set $G$ is a group if it's equiped with a binary operation/map: $G\times G \rightarrow G, \space (g_1,g_2)\rightarrow g_1 \circ g_2$. Additionally two groups $G,H$ are isomorphic $G \cong H$ if there exists a isomorphism $f:G \rightarrow H$.
Now, for each such map $G\times G \rightarrow G$ we get a different group. Because there are $n^{n^2}$ such different maps (for $|G|=n$), the number of all possible different groups should be $\leq n^{n^2}$. And since we have different binary operations defined on the same set, we should get different multiplication (Cayley) tables, we would have $f(a)\star f(b)\neq f(a \circ b)$ for $a,b \in G$ and some bijection $f$ . Meaning that, since homomorphisms don't exist, all those different groups are nonisomorphic and we have therefore shown the above theorem to be true.
More intuitively:
The statement of beeing (non) isomorphic can be translated to (not) having the same multiplication table. If we have a group of order $n$, then the multiplication table should be of size $n\times n= n^2$. Each of the $n^2$ entries (in the table) has $n$ possible entries, representing a different choice of the above mentioned binary operation. Because those possibilities multiply, we would have: $n\times \cdots \times n=n^{n^2}$ and each table beeing different, those groups are nonisomorphic.
My question:
Is my reasoning, in both cases, correct? Am I missing something? How would I prove, more formally,  that for different binary operations defined on the same set we get different nonisomorphic groups?
Related questions:
Number of distinct groups of order n upto isomorphism, for a fixed integer n.
The number of groups of order n(upto isomorphism)is
Comment: I am a physicist and don't have major ambitions in abstract algebra, please be nice.
 A: You seem to be assuming that if the multiplication tables are different the groups are not isomorphic, but that is not true.  What is true is that if the tables are the same the groups are isomorphic.  Your argument that there are at most $n^{n^2}$ tables is correct, which shows that there are no more nonisomorphic groups than that.  
You can do much better by noting that the table has to have each element once in each column of the table.  As there are $n!$ possible columns there are at most $n!^n\approx \left(\left(\frac ne\right)^n\right)^n(2\pi n)^{n/2}$ nonisomorphic groups.  For $n=10$ this is $4\cdot 10^{65}$ instead of $10^{100}$ and for $n=100$ it is about $10^{15797}$ instead of $10^{20000}$.  Of course, you can do much better by considering that each row must also have one of each element, but I don't see a quick way to quantify that.
A: Here's how to do a little better than $n^{n^2}$. For a group $G$, define
$d(G)$ to be the least positive integer $k$ such that $G$ can be generated by $k$ elements and let $f(n)$ denote the number of non-isomorphic groups of order $n$.
We first show that if $|G| = n$ then $d(G) \leq \log n$. Let $1=G_0 <G_1 <G_2 <\dots < G_r = G$ be a maximal chain of subgroups. Let $g_i \in G_i \setminus G_{i−1}$ for $1 \leq i \leq r$. Then $\langle g_1, \ldots ,g_i \rangle = G_i$, as one easily sees by induction. In particular, $G$ can be generated by $r$ elements. Now by Lagrange’s Theorem
$$ |G| = \prod_{i=1}^r [G_i : G_{i-1}] \geq 2^r.$$
Hence $r \leq \lfloor \log n \rfloor$. Then by Cayley’s theorem $G\leq S_n$ and so $f(n)$ is at most the number of subgroups of order $n$ in $S_n$ which is at most the number of $\lfloor \log n \rfloor$-generator subgroups of $S_n$ which is at most the number of $\lfloor \log n \rfloor$-element subsets of $S_n$. This last quantity is $\leq (n!)^{\log n} \leq n^{n \log n}$.
