TITLE: Upper bounds on the size of $\operatorname{Aut}(G)$
QUESTION [24 upvotes]: Any automorphism of a group $G$ is a bijection that fixes the identity, so an easy upper bound for the size of $\operatorname{Aut}(G)$ for a finite group $G$ is given by 
\begin{align*}\lvert\operatorname{Aut}(G)\rvert \leq (|G| - 1)! \end{align*}
This inequality is an equality for cyclic groups of orders $1$, $2$ and $3$ and also the Klein four-group $\mathbb{Z}_2 \times \mathbb{Z_2}$. I think it's reasonable to believe that they are the only groups with this property. The factorial $(|G| - 1)!$ is eventually huge. I searched through groups of order less than $100$ with GAP and found no other examples.
The problem can be reduced to the abelian case. We can check the groups of order $< 6$ by hand. Then if $|G| \geq 6$ and the equality holds, we have $\operatorname{Aut}(G) \cong S_{|G|-1}$. Now $\operatorname{Inn}(G)$ is a normal subgroup of $\operatorname{Aut(G)}$, and is thus isomorphic to $\{(1)\}$, $A_{|G|-1}$ or $S_{|G|-1}$. This is because $A_n$ is the only proper nontrivial normal subgroup of $S_n$ when $n \geq 5$. We can see that $(|G| - 1)!/2 > |G|$ and thus $\operatorname{Inn}(G) \cong G/Z(G)$ is trivial.
How to prove that there are no other groups for which the equality $\lvert\operatorname{Aut}(G)\rvert = (|G| - 1)!$ holds? Are any better upper bounds known for larger groups?

REPLY [2 votes]: I am quite late here, but perhaps the result is worth mentioning.
For each prime power $q=p^k$, define $\theta(q) = \lvert \operatorname{GL}_k(p)\rvert$, the order of $\operatorname{Aut}(C_p^k)$. For a positive integer $n=p_1^{a_1}\ldots p_k^{a_k}$ let $\theta(n) = \prod_{i=1}^k\theta(p_i^{a_i})$. So $\theta(n)$ is basically the order of the automorphism group of the unique elementary abelian group of order $n$. (I am abusing terminology a little here by calling a group elementary abelian if it is a direct product of elementary abelian groups in the usual sense.)
Now, as to your second question, Peter Neumann has shown that for a finite group $G$ of order $n$, $\lvert\operatorname{Aut}(G)\rvert$ divides $|G/Z(G)|\theta(n)$, or equivalently that $\lvert\operatorname{Out}(G)\rvert$ divides $\theta(n)$. The implied upper bound is sharp since equality is attained infinitely often (for elementary abelian groups).
If $G$ is nilpotent of order $n$ then  $\lvert\operatorname{Aut}(G)\rvert$ divides $\theta(n)$. See here for a proof. In that same paper, Birkhoff and Hall show that if $G$ is soluble of order $n$ then $\lvert\operatorname{Aut}(G)\rvert$ divides $n\theta(n)$. Neumann improves this by showing that if $G$ is soluble of order $n=p_1^{a_1}\ldots p_k^{a_k}$ and $P_i \in \operatorname{Syl}_{p_i}(G)$ for $i \leq k$, then $\lvert\operatorname{Aut}(G)\rvert$ divides $|G/Z(G)|\cdot \prod_{i=1}^k\lvert\operatorname{Aut}(P_i)\rvert$. The proof of that last result (which is basically a lemma in Suzuki's "Group Theory II") is very cool.