Automorphisms of a finite non-abelian group Sia $G$ un gruppo non abeliano di ordine $21$, quanti automorfismi possiede un gruppo siffatto?
Translation (by Davide): Let $G$ be a non-abelian group of order $21$. How many automorphisms does such a group possess?
 A: A different solution.
Notice first that $G$ has trivial center, so $|\operatorname{Inn}(G)| = |G/Z(G)| =  21$. Thus $|\operatorname{Aut}(G)|$ is a multiple of $21$. Then bound $|\operatorname{Aut}(G)|$ above by $42$, so $|\operatorname{Aut}(G)| = 21$ or $|\operatorname{Aut}(G)| = 42$. Finally, you can find an automorphism that is not inner, and thus it turns out that the answer is $42$ (as usual).
Here are details for the last part. By Cauchy's theorem we find non-identity elements $x$ and $y$ in $G$ such that $x^3 = y^7 = 1$. Since $\langle y \rangle \trianglelefteq G$, we have that $x^{-1}yx = y^{\alpha}$ where $1 \leq \alpha \leq 6$. Then $y = x^{-3}yx^3 = y^{\alpha^3}$, and so $\alpha^3 \equiv 1 \mod 7$. Therefore $\alpha = 2$ or $\alpha = 4$, because $G$ would be cyclic in the case of $\alpha = 1$. Let's assume $\alpha = 2$ for clarity, the other case is similar (and the group would still be the same up to isomorphism). Thus $x^{-1}yx = y^2$.
It is not difficult to show that the elements of $G$ are of the form $x^ky^l$, where $0 \leq k \leq 2$ and $0 \leq l \leq 6$. 
Let $\phi: G \rightarrow G$ be an automorphism of $G$. Because $G$ is generated by $x$ and $y$, we have that $\phi$ is completely determined by the values of $x$ and $y$. Now $\phi(y)$ and $y$ have the same order, so $\phi(y) = y^j$, where $1 \leq j \leq 6$. Similarly $\phi(x)$ and $x$ have the same order, so $\phi(x) = xy^i$ or $\phi(x) = x^2y^i$, where $0 \leq i \leq 6$.
Could it be that $\phi(x) = x^2y^i$? Then $\phi(xy)\phi(xy) = x^2y^{5i+5j}$ and $\phi(xyxy) = \phi(x^2y^3) = xy^{5i+3j}$. Therefore $y^{2j} = 1$, but this means that $y^j = 1$, which is not possible.
Thus there are $7$ possibilities for the value of $\phi(x)$. Since there are $6$ possibilities for the value of $\phi(y)$, we have that $|Aut(G)| \leq 42$. Finally we need to find an outer automorphism. Because $y$ and $y^3$ are not conjugate, we could try $\phi(x) = x$ and $\phi(y) = y^3$.
A: There may be easier ways to do this, but here is one. Let $A$ be the automorphism group of $G$. Note that $G$ has seven Sylow $3$-subgroups and $14$ elements of order $3$. Any two different Sylow $3$-subgroups generate $G,$ so no non-identity element of $A$ can fix more than two elements of order $3$ in $G.$ On the other hand, any element of $A$ which fixes an element of order $3$ has to fix the inverse of that element. Hence every non-identity element of $A$ fixes $0$ or $2$ elements of order $3$ in $G.$ Let $\theta$ be the permutation character of $A$ afforded by its action on the elements of order $3$ in $G$. Then $\theta(\theta- 2 \times 1_A)$ vanishes on all non-identity elements of $A$ (where $1_A$ denotes the trivial character). It is a generalized character of degree $168$, so that $|A|$ divides $168$ (taking the inner product with $1_A$). 
\medskip
On the other hand, let $F$ be a Sylow $7$-subgroup of $A$. Let $a$ be an automorphism of order $2$ in $A$. Suppose that $a$ centralizes $F$ (note that $G$ has trivial centre, so is isomorphic to ites inerr automorphism group, so may be regarded as a normal subgroup of $A$). Notice that $C_G(F) = F.$ Now we have $[\langle a \rangle,F,G] = [F,G,\langle a \rangle ] =1,$ so that by the three subgroups lemma, $[G,\langle a \rangle, F] = 1.$ But $C_G(F) = F,$ so that $[G,\langle a \rangle] \leq F$ and $[G,\langle a \rangle, \langle a \rangle] = 1.$ Since $|G|$ is odd, standard results on coprime automorphisms show that $[G,\langle a \rangle ] = 1,$ a contradiction since $a$ has order $2$. 
\medskip
Hence a Sylow $2$-subgroup of $A$ acts faithfully as a group of automorphisms of $F,$ so is cyclic of order (at most) $2$. Hence $|A|$ divides $42$. But $G$ is isomorphic to a subgroup of the holmorph of $F,$ which has order $42$, so $|A| = 42.$ 
A: Such a group is the semidirect product $C_7\rtimes C_3$.  Let $C_7=\langle x\rangle$ and $C_3=\langle y\rangle$. Here $y$ acts by $x^y=x^2$.  Then an automorphism $\alpha$ must send $x$ to some power of $x$ (because $\langle x\rangle$ contains all six elements of order $7$); there are $6$ choices there. 
$\alpha$ must then send $y$ to some $x^iy^j$ Such that $x^{y^j}=x^2$; since we can consider $j\pmod{3}$, we need $j=1$.  There are $7$ choices for $i$ (from $0$ to $6$), and so there are at most $42$ automorphisms of our group. 
But every such choice yields an automorphism.  There are many ways to show this; I like taking a presentation for your group to be $\langle x,y\ |\ x^7=y^3=1, x^y=x^2\rangle$, and then simply checking that for each of the $42$ choices for $\alpha$, $\alpha(x)$ and $\alpha(y)$ generate your group, and $\alpha(x)^7=\alpha(y)^3=1$, with $\alpha(x)^{\alpha(y)}=\alpha(x)^2$.  Finiteness then guarantees that all such choices give automorphisms.
It's also not hard to show the automorphism group is the holomorph of $C_7$, namely $C_7\rtimes C_6$.  Here the generator for the $C_7$ factor is the map sending $x$ to $x$ and $y$ to $xy$.  The generator for the $C_6$ factor is the map sending $x$ to $x^3$ and $y$ to $y$.
All of this works in more generality as well.  For the finite centerless group $C_m\rtimes C_n$, there are $m\phi(m)$ automorphisms, and the automorphism group is the holomorph $C_m\rtimes C_{\phi(m)}$.
