A Problem On Finite Group Suppose $G$ is a finite group and $G$ is not a $p$-group ($|G|\neq p^n$). Show that
$$ \text{Aut}(G)\ncong Q_8 $$
where $Q_8$ is quaternion group.
 A: It is known that the automorphism group of a group $G$ contains a subgroup $Inn(G)$, which is called the inner automorphisms, isomorphic to $G/Z(G)$.
Assume that $G$ is a group with order divisible by at least two primes and $Aut(G)\cong Q_8$. We also know that $G/Z(G)$ is isomorphic to a subgroup $Q_8$. But if $G/Z(G)$ is cyclic then $G/Z(G)=1$. Hence $Inn(G)=1$ or $Inn(G)=Q_8$. 
Assume that $Inn(G)=Q_8$. It is easy to show that in this case $G$ is the direct product of its Sylow subgroups. Hence $Aut(G)$ is the direct product of the automorphism groups of its Sylow subgroups. But for an odd prime $p$ dividing $|G|$, the Sylow subgroup $P\in Syl_p(G)$ is element wise fixed by every automorphism of $G$ (since $P\subseteq Z(G)$). Hence $Aut(P)=1$. We know that $Aut(P)=1$ implies $|P|=1$ or $|P|=2$. Since $p$ is odd we have $P=1$, contradiction.
Now assume that $Inn(G)=1$ so $G$ is abelian. We are again in the case where $G$ is the direct product of its Sylow subgroups. But $Q_8$ cannot be written as a direct product of two nontrivial groups, i.e. every automorphism group of a Sylow subgroup of $G$ is trivial except one. Hence $|G|$ has two prime divisors, an odd prime $p$ and $2$, also Sylow $2$ subgroup of $G$ has order $2$. Let $P$ be the Sylow $p$-subgroup of $G$.
Therefore $P$ is an abelian $p$-group with $Aut(P)\cong Q_8$ where $p$ is an odd prime. Since $P$ is abelian it can be written as the direct product of cyclic $p$-groups, say $P\cong C_1\times C_2\times ...\times C_r$. Now $r\neq 1$ since the automorphism group of a cyclic group is cyclic. We also know that $Aut(C_1)\times...\times Aut(C_r)$ can be embedded into $Aut(P)$. The problem is however, no subgroup of $Q_8$ can be written as a direct product. In fact, every proper subgroup of $Q_8$ is cyclic. Hence $Aut(C_i)=1$ for at least one $i$, which implies that $C_i=1$, contradiction.
A: D. Flannery and D. MacHale proved in $1981$, in the article Some Finite Groups Which Are Rarely Automorphism Groups I several results, e.g., the following Theorem on page $214$:
Theorem $4$: There is no finite group $G$ such that ${\rm Aut}(G)\cong Q_n$, where $Q_n$ is the dicyclic group of order $4n$, i.e., $Q_2$ is the quaternion group.
The proof is not difficult, and it does not seem useful to produce it here again. Actually, if $|{\rm Aut}(G)|=8$, then $G$ is isomorphic to either $D_4$ or $C_4\times C_2$, see Theorem $5$. So in any case $\text{Aut}(G)\ncong Q_8$.
