Prove that for $n\gt 2$, $| \operatorname{Aut}(D_n)|\le n\,\phi(n)$ where $D_n$ is the dihedral group with $2n$ elements and $\phi$ is Euler phi function.
Let $\rho$ be a rotation such that $o(\rho)=n$, that is $R_n = \langle\rho\rangle$, and $\psi$ an automorphism of $D_n$; then $\psi(\rho)$ must have order $n$ and there are only $\phi(n)$ such elements in $D_n$ and they are all rotations, therefore $\psi(R_n)=R_n$. Now let $\iota$ be the reflection through the $x$-axis, we have to send it in one of the $n$ reflection and since $D_n = \langle\rho, \iota \rangle$, $\psi$ is univocally determined. In conclusion we have at most $n\phi(n)$ choices for $\psi$.
I could have also considered all the sets with two elements that generate $D_n$ which are of the form $\{\rho, \iota\}$ with $\rho$ a rotation of order $n$ and $\iota$ a reflection (there are $n\phi(n)$ of them); since an automorphism sends a set of generators into a set of generators we have again at most $n\phi(n)$ automorphisms (a rotation will be sent in a rotation) obtained by extending to a homomorphism the various choices (which give us bijective functions). Moreover there are exactly $n\phi(n)$ of them because every choice give us a different automorphism.
Are both solutions, and my remark, correct?
Thanks in advance
Edit: I was wrong saying that the only sets of two elements generating $D_n$ are of the form $\{\rho, \iota\}$, because there are also sets formed by two reflections, but since a rotation must be sent in a rotation my second proof should be correct.